Monday 28 November 2011

factbook.xml ids

Seem to be broken.. 21 duplicate ids (found in 7.7 secs). These are all cities in more than one province. Kansas City is in four!
import module namespace functx="http://www.functx.com";
declare variable $data:=db:open("factbook","factbook.xml");
let $i:=$data//@id
return functx:non-distinct-values($i)

f0_3099 f0_3111 f0_3123 f0_3129 f0_1533 f0_1583 f0_4275 f0_1598 f0_6017 f0_6689 f0_7122 f0_8638 f0_1715 f0_10628 f0_10634 f0_1865 f0_1875 f0_14313 f0_14419 f0_2194 f0_2237

Sunday 27 November 2011

more performance

Back on node 0.4, working on id resolution, performance dreadful
Document Path:          /fb/country
Document Length:        158878 bytes

Concurrency Level:      5
Time taken for tests:   913.225 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      15911748 bytes
HTML transferred:       15887800 bytes
Requests per second:    0.11 [#/sec] (mean)
Time per request:       45661.240 [ms] (mean)
Time per request:       9132.248 [ms] (mean, across all concurrent requests)
Transfer rate:          17.02 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       4
Processing:  7438 44742 6506.7  45143   55947
Waiting:     7397 44712 6503.3  45133   55937
Total:       7439 44743 6506.4  45143   55947

Percentage of the requests served within a certain time (ms)
  50%  45143
  66%  47397
  75%  47790
  80%  48077
  90%  49007
  95%  51383
  98%  55787
  99%  55947
 100%  55947 (longest request)

Removing idLink
Document Path:          /fb/country
Document Length:        158692 bytes

Concurrency Level:      5
Time taken for tests:   40.286 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      15893156 bytes
HTML transferred:       15869200 bytes
Requests per second:    2.48 [#/sec] (mean)
Time per request:       2014.309 [ms] (mean)
Time per request:       402.862 [ms] (mean, across all concurrent requests)
Transfer rate:          385.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       3
Processing:   344 1977 292.5   1955    2817
Waiting:      288 1947 287.4   1924    2590
Total:        345 1977 292.3   1955    2817

Percentage of the requests served within a certain time (ms)
  50%   1955
  66%   2001
  75%   2042
  80%   2068
  90%   2338
  95%   2558
  98%   2607
  99%   2817
 100%   2817 (longest request)

Saturday 19 November 2011

performance

dynamic-path is the killer   50%   1158
app:td hardcoded to return td 
 50%   1441
declare function app:td($item, $field-def) as element(td) {
     (: path default to name  :)
   
             let $path:=($field-def/@path,concat('@',$field-def/@name))[1]
             let $data:="test"
             (: let $data:=data(functx:dynamic-path($item,$path)) :)
             let $x :=
                 if($field-def/@type='id' and $field-def/@link)
                 then  app:hyperlink(concat($field-def/@link,"/",$data),string($data)) 
                 else $data
         
             let $d:={
                 (if($field-def/@type=('integer','float'))
                 then attribute class {'r'}
                 else ''
                 ,$x)
             }
                  
             return $d 
};
Working solution
declare function app:data($item , $path as xs:string) {
    let $f:=app:fpath($path)
    return data($f($item))
 };
 
declare function app:fpath($path){
   util:eval(concat("function($item){$item/",$path,"}"))
}; 

node back off to 0.4 again

Reverted to 0.4.12, by removing 0.61 then using these

Tuesday 15 November 2011

dojo-boilerplate

Tried this https://github.com/csnover/dojo-boilerplate, blog piece here
andy@ThinkPad-T42:~/workspace/dojo-boilerplate$ util/build.sh
Using /home/andy/workspace/dojo-boilerplate/profiles/main.profile.js. CSS will be copied and JS will be built.
Cleaning old files... Done

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Cannot read property 'addEventListener' of undefined
    at /home/andy/workspace/dojo-boilerplate/src/js/dojo/dojo.js:242:65
    at Object. (/home/andy/workspace/dojo-boilerplate/src/js/dojo/dojo.js:1749:2)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Array.0 (module.js:470:10)
    at EventEmitter._tickCallback (node.js:192:40)
Ubuntu, node 0.61
dojo bug

Monday 14 November 2011

performance

checking Apache using basex interface, some fails but very fast.
Document Path:          /velvet/basex.php/table.php
Document Length:        45105 bytes

Concurrency Level:      5
Time taken for tests:   8.694 seconds
Complete requests:      100
Failed requests:        7
   (Connect: 0, Receive: 0, Length: 7, Exceptions: 0)
Write errors:           0
Total transferred:      4524892 bytes
HTML transferred:       4510492 bytes
Requests per second:    11.50 [#/sec] (mean)
Time per request:       434.685 [ms] (mean)
Time per request:       86.937 [ms] (mean, across all concurrent requests)
Transfer rate:          508.28 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    3   1.7      2       8
Processing:   276  426  96.0    408     929
Waiting:      150  278  88.4    263     708
Total:        278  428  96.6    411     937

Percentage of the requests served within a certain time (ms)
  50%    411
  66%    438
  75%    462
  80%    479
  90%    551
  95%    611
  98%    671
  99%    937
 100%    937 (longest request)
After the pipeline
Document Path:          /country
Document Length:        93520 bytes

Concurrency Level:      5
Time taken for tests:   113.181 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      9375940 bytes
HTML transferred:       9352000 bytes
Requests per second:    0.88 [#/sec] (mean)
Time per request:       5659.026 [ms] (mean)
Time per request:       1131.805 [ms] (mean, across all concurrent requests)
Transfer rate:          80.90 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.5      0       8
Processing:  1123 5557 1114.8   5243    8239
Waiting:     1103 5550 1115.0   5236    8230
Total:       1126 5557 1114.2   5243    8239

Percentage of the requests served within a certain time (ms)
  50%   5243
  66%   5296
  75%   5370
  80%   5848
  90%   7680
  95%   8071
  98%   8178
  99%   8239
 100%   8239 (longest request)

Sunday 13 November 2011

more performance

Getting better not sure why, working on send pipeline.

Document Path:          /country
Document Length:        93520 bytes

Concurrency Level:      5
Time taken for tests:   103.874 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      9375970 bytes
HTML transferred:       9352000 bytes
Requests per second:    0.96 [#/sec] (mean)
Time per request:       5193.684 [ms] (mean)
Time per request:       1038.737 [ms] (mean, across all concurrent requests)
Transfer rate:          88.15 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.2      0       9
Processing:  1000 5090 569.7   5191    5304
Waiting:      997 5088 570.3   5189    5302
Total:       1001 5090 568.9   5191    5304

Percentage of the requests served within a certain time (ms)
  50%   5191
 

Wednesday 9 November 2011

performance

Trying to speed it up. This with
declare option output:indent "no";

but it is just getting slower each run :-( (note log has 2581 Rows)
 50%   7767 repeat yesterdays test
50% 8162 after no indent
50% 7450 after optimize
127.0.0.1 - - [Wed, 09 Nov 2011 22:18:13 GMT] "GET /country HTTP/1.0" 200 - "-" "ApacheBench/2.3"
queue size:  49
queue size:  50
queue size:  51
queue size:  52
queue size:  53
queue size:  54
queue size:  55
queue size:  56
queue size:  57
queue size:  58
queue size:  59
Server Software:        
Server Hostname:        127.0.0.1
Server Port:            9000

Document Path:          /country
Document Length:        93520 bytes

Concurrency Level:      5
Time taken for tests:   179.847 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      9375950 bytes
HTML transferred:       9352000 bytes
Requests per second:    0.56 [#/sec] (mean)
Time per request:       8992.359 [ms] (mean)
Time per request:       1798.472 [ms] (mean, across all concurrent requests)
Transfer rate:          50.91 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.9      0       9
Processing:  1519 8826 1899.6   8162   11889
Waiting:     1514 8808 1898.9   8143   11880
Total:       1519 8826 1899.4   8162   11889

Percentage of the requests served within a certain time (ms)
  50%   8162
  66%  10558
  75%  10851
  80%  10988
  90%  11228
  95%  11375
  98%  11575
  99%  11889
 100%  11889 (longest request)


dojo grid tips

Monday 7 November 2011

Node BaseX performance tesing


50% 5692
Server Software:       
Server Hostname:        127.0.0.1
Server Port:            9000

Document Path:          /country
Document Length:        203972 bytes

Concurrency Level:      5
Time taken for tests:   115.494 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      20421162 bytes
HTML transferred:       20397200 bytes
Requests per second:    0.87 [#/sec] (mean)
Time per request:       5774.684 [ms] (mean)
Time per request:       1154.937 [ms] (mean, across all concurrent requests)
Transfer rate:          172.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.6      0       5
Processing:  1708 5662 575.7   5692    6700
Waiting:     1173 5619 619.9   5670    6689
Total:       1710 5662 575.3   5692    6700

Percentage of the requests served within a certain time (ms)
  50%   5692
  66%   5738
  75%   5773
  80%   5804
  90%   5936
  95%   6444
  98%   6645
  99%   6700
 100%   6700 (longest request)