[Pkg-javascript-commits] [node-leveldown] 363/492: bleh

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit 4053aafba4f276a477256478fa87b73db0e78912
Author: Rod Vagg <rod at vagg.org>
Date:   Sun Jul 7 14:13:12 2013 +1000

    bleh
---
 bench/db-bench-plot.sh | 21 ++++++++++++++-------
 bench/db-bench.js      | 18 ++++++++++--------
 2 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/bench/db-bench-plot.sh b/bench/db-bench-plot.sh
index 734d47a..4a8293d 100755
--- a/bench/db-bench-plot.sh
+++ b/bench/db-bench-plot.sh
@@ -3,7 +3,7 @@
 gnuplot <<EOF
   reset
   set terminal pngcairo truecolor enhanced font "Ubuntu Mono,13" size 1920, 1080
-  set output "/tmp/random-writes.png"
+  set output "/tmp/5mbench.png"
   set datafile separator ','
 
   set logscale y
@@ -35,15 +35,22 @@ gnuplot <<EOF
   set style line 8 lt 7 ps 0.1 lc rgb "#55CC3C3C"
   set style line 9 lt 1 lw 2   lc rgb "#55CC3C3C"
 
+  set style line 10 lt 7 ps 1.2 lc rgb "#553C3C3C"
+  set style line 11 lt 7 ps 0.1 lc rgb "#553C3C3C"
+  set style line 12 lt 1 lw 2   lc rgb "#553C3C3C"
+
   plot \
       1/0 with points title "Google LevelDB" ls 1 \
     , 1/0 with points title "Hyper LevelDB"  ls 4 \
     , 1/0 with points title "Basho LevelDB"  ls 7 \
-    , "/tmp/rndbench_timing_google.csv" using (\$1/1000/60):(\$4/1000000) notitle         ls 2 axes x1y1 \
-    , "/tmp/rndbench_timing_hyper.csv"  using (\$1/1000/60):(\$4/1000000) notitle         ls 5 axes x1y1 \
-    , "/tmp/rndbench_timing_basho.csv"  using (\$1/1000/60):(\$4/1000000) notitle         ls 8 axes x1y1 \
-    , "/tmp/rndbench_timing_google.csv" using (\$1/1000/60):(\$5)         w lines notitle ls 3 axes x1y2 \
-    , "/tmp/rndbench_timing_hyper.csv"  using (\$1/1000/60):(\$5)         w lines notitle ls 6 axes x1y2 \
-    , "/tmp/rndbench_timing_basho.csv"  using (\$1/1000/60):(\$5)         w lines notitle ls 9 axes x1y2 \
+    , 1/0 with points title "LMDB"  ls 10 \
+    , "5m_google.csv" using (\$1/1000/60):(\$4/1000000) notitle         ls 2 axes x1y1 \
+    , "5m_hyper.csv"  using (\$1/1000/60):(\$4/1000000) notitle         ls 5 axes x1y1 \
+    , "5m_basho.csv"  using (\$1/1000/60):(\$4/1000000) notitle         ls 8 axes x1y1 \
+    , "5m_lmdb.csv"   using (\$1/1000/60):(\$4/1000000) notitle         ls 11 axes x1y1 \
+    , "5m_google.csv" using (\$1/1000/60):(\$5)         w lines notitle ls 3 axes x1y2 \
+    , "5m_hyper.csv"  using (\$1/1000/60):(\$5)         w lines notitle ls 6 axes x1y2 \
+    , "5m_basho.csv"  using (\$1/1000/60):(\$5)         w lines notitle ls 9 axes x1y2 \
+    , "5m_lmdb.csv"   using (\$1/1000/60):(\$5)         w lines notitle ls 12 axes x1y2 \
 
 EOF
diff --git a/bench/db-bench.js b/bench/db-bench.js
index 0f46f5f..e81ac66 100755
--- a/bench/db-bench.js
+++ b/bench/db-bench.js
@@ -27,12 +27,7 @@ if (!options.useExisting) {
   leveldown.destroy(options.db, function () {})
 }
 
-var db          = leveldown(options.db, {
-        errorIfExists   : false
-      , createIfMissing : true
-      , cacheSize       : options.cacheSize << 20
-      , writeBufferSize : options.writeBufferSize << 20
-    })
+var db          = leveldown(options.db)
   , timesStream = options.timingOutput
         && fs.createWriteStream(options.timingOutput, 'utf8')
 //  , throughputStream = options.throughputOutput
@@ -47,7 +42,14 @@ function makeKey () {
 
 timesStream.write('Elapsed (ms), Entries, Bytes, Last 1000 Avg Time, MB/s\n')
 
-setTimeout(function () { db.open(function (err) {
+setTimeout(function () {
+  db.open({
+        errorIfExists   : false
+      , createIfMissing : true
+      , cacheSize       : options.cacheSize << 20
+      , writeBufferSize : options.writeBufferSize << 20
+  }, function (err) {
+
   if (err)
     throw err
 
@@ -121,4 +123,4 @@ setTimeout(function () { db.open(function (err) {
 
   for (var i = 0; i < options.concurrency; i++)
     write()
-})}, 500)
\ No newline at end of file
+})}, 500)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list