Skip to content

Commit

Permalink
new benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Jul 24, 2013
1 parent b497b13 commit 4cc9c89
Show file tree
Hide file tree
Showing 9 changed files with 13,497 additions and 6,412 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,4 +2,5 @@
node_modules
tests/db
tests/benchmarks/db
tests/benchmarks/lib/db
tests/benchmarks/old/db
8 changes: 4 additions & 4 deletions tests/benchmarks/lib/benchmark.js
Expand Up @@ -45,7 +45,7 @@ if (wrap) {

/// create read stream

var rs = new (require('stream').PassThrough)({objectMode: true});
//var rs = new (require('stream').PassThrough)({objectMode: true});

/// cretae write stream

Expand All @@ -57,7 +57,7 @@ var ws = db.createWriteStream({

/// pipe

rs.pipe(ws);
//rs.pipe(ws);

/// start timer

Expand All @@ -79,14 +79,14 @@ function writeSome() {
if (key < max) {
write(chunks);
setTimeout(writeSome, 10);
} else rs.end();
} else ws.end();
}

writeSome();

function write(n) {
for(var i = 0; i < n; i ++) {
key ++;
rs.write({key: key.toString(), value: value});
ws.write({key: key.toString(), value: value});
}
}
Binary file removed tests/benchmarks/lib/db/000026.sst
Binary file not shown.
Binary file removed tests/benchmarks/lib/db/000058.log
Binary file not shown.
125 changes: 0 additions & 125 deletions tests/benchmarks/lib/db/LOG

This file was deleted.

Binary file removed tests/benchmarks/lib/db/MANIFEST-000002
Binary file not shown.
7 changes: 5 additions & 2 deletions tests/benchmarks/lib/plot.js
Expand Up @@ -13,8 +13,6 @@ data = data.filter(function(d) {
var i = 0;

data.forEach(function(d) {
i ++;
d.id = 'chart-' + i;
var series = Object.keys(d.points);
var main = series.map(function(serie) {
return {
Expand Down Expand Up @@ -45,6 +43,11 @@ data = data.sort(function(a, b) {
return a.yLabel > b.yLabel ? 1 : -1 ;
});

data.forEach(function(d) {
i ++;
d.id = 'chart-' + i;
});

var labels = [];

var oldLabel;
Expand Down

0 comments on commit 4cc9c89

Please sign in to comment.