Permalink
Browse files

Updating speedtest.gnuplot for outputs of new speedtest program.

  • Loading branch information...
1 parent e3ec254 commit 7355d40ca17d9787d1110d42a5c94e2930050467 @bingmann committed Mar 20, 2013
Showing with 134 additions and 107 deletions.
  1. +5 −1 speedtest/Makefile.am
  2. +5 −1 speedtest/Makefile.in
  3. +124 −105 speedtest/speedtest.gnuplot
View
6 speedtest/Makefile.am
@@ -13,7 +13,8 @@ speedtest_tune_SOURCES = speedtest-tune.cc
AM_CXXFLAGS = -W -Wall -Wold-style-cast -DNDEBUG -I$(top_srcdir)/include
EXTRA_DIST = \
- speedtest.gnuplot transpose.awk \
+ speedtest.gnuplot \
+ transpose.awk \
results-2007/speedtest.pdf \
results-2007/speedtest-2007-??.png \
results-2007/speed-*.txt \
@@ -27,3 +28,6 @@ plots:
USER=tb ./speedtest.gnuplot
pdftoppm speedtest.pdf speedtest-plot
for f in *.ppm; do convert $$f $${f%%.ppm}.png; rm $$f; done
+
+transpose:
+ for f in speed-*.txt; do ./transpose.awk $$f > $${f%%.txt}.trt; done
View
6 speedtest/Makefile.in
@@ -207,7 +207,8 @@ speedtest_SOURCES = speedtest.cc
speedtest_tune_SOURCES = speedtest-tune.cc
AM_CXXFLAGS = -W -Wall -Wold-style-cast -DNDEBUG -I$(top_srcdir)/include
EXTRA_DIST = \
- speedtest.gnuplot transpose.awk \
+ speedtest.gnuplot \
+ transpose.awk \
results-2007/speedtest.pdf \
results-2007/speedtest-2007-??.png \
results-2007/speed-*.txt \
@@ -490,6 +491,9 @@ plots:
pdftoppm speedtest.pdf speedtest-plot
for f in *.ppm; do convert $$f $${f%%.ppm}.png; rm $$f; done
+transpose:
+ for f in speed-*.txt; do ./transpose.awk $$f > $${f%%.txt}.trt; done
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
View
229 speedtest/speedtest.gnuplot
@@ -17,183 +17,202 @@ set output 'speedtest.pdf'
# for generating smaller images:
# set terminal pdf size 4, 2.4
+### Measuring a Sequence of Insert Operations
+
### 1st Plot
-set title "Speed Test Multiset - Absolute Time - Insertion Only (125-32000 Items)"
+set title "Speed Test Multiset - Normalized Time - Insertion Only (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:34000]
-set xlabel "Inserts"
-set ylabel "Seconds"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
+set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-insert.txt" using 1:2 title "std::multiset" with linespoints, \
- "speed-insert.txt" using 1:3 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-insert.txt" using 1:4 title "stx::btree_multiset<4>" with linespoints, \
- "speed-insert.txt" using 1:16 title "stx::btree_multiset<32>" with linespoints, \
- "speed-insert.txt" using 1:32 title "stx::btree_multiset<64>" with linespoints, \
- "speed-insert.txt" using 1:64 title "stx::btree_multiset<128>" with linespoints, \
- "speed-insert.txt" using 1:100 title "stx::btree_multiset<200>" with linespoints
+plot "speed-set-insert.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multiset" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multiset" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_set" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
+ "speed-set-insert.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
### 2nd Plot
-set title "Speed Test Multiset - Absolute Time - Insertion Only (32000-32768000 Items)"
+set title "Speed Test - Finding the Best Slot Size - Insertion Only - Plotted by Slots in B+ Tree"
-set xrange [30000:38000000]
+set key top right
+set autoscale x
+set xlabel "Leaf/Inner Slots"
+set ylabel "Seconds"
-replot
+plot "speed-set-insert.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-set-insert.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-set-insert.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines
-### 3rd Plot
+### Measuring a Sequence of Insert/Find/Erase Operations
-set title "Speed Test Multiset - Normalized Time - Insertion Only (125-32768000 Items)"
+### 1st Plot
+
+set title "Speed Test Multiset - Normalized Time - Insert/Find/Erase (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:38000000]
-set xlabel "Inserts"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-insert.txt" using 1:($2 / $1) * 1000000 title "std::multiset" with linespoints, \
- "speed-insert.txt" using 1:($3 / $1) * 1000000 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-insert.txt" using 1:($4 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
- "speed-insert.txt" using 1:($16 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
- "speed-insert.txt" using 1:($32 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
- "speed-insert.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
- "speed-insert.txt" using 1:($100 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
+plot "speed-set-all.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multiset" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multiset" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_set" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
+ "speed-set-all.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
-### 4th Plot
+### 2nd Plot
-set title "Speed Test - Finding the Best Slot Size - Insertion Only - Plotted by Slots in B+ Tree"
+set title "Speed Test - Finding the Best Slot Size - Insert/Find/Erase - Plotted by Slots in B+ Tree"
set key top right
set autoscale x
set xlabel "Leaf/Inner Slots"
set ylabel "Seconds"
-unset logscale x
-unset logscale y
-plot "speed-insert.trt" using ($0*2 + 4):17 every ::2 title "8192000 Inserts" with lines, \
- "speed-insert.trt" using ($0*2 + 4):18 every ::2 title "16384000 Inserts" with lines, \
- "speed-insert.trt" using ($0*2 + 4):19 every ::2 title "32768000 Inserts" with lines
+plot "speed-set-all.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-set-all.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-set-all.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines
-### Now Measuring a Sequence of Insert/Find/Erase Operations
+### Now Measuring only Find Operations
### 1st Plot
-set title "Speed Test Multiset - Insert/Find/Erase (125-32000 Items)"
+set title "Speed Test Multiset - Normalized Time - Find Only (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:34000]
-set xlabel "Data Pairs"
-set ylabel "Seconds"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
+set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-all.txt" using 1:2 title "std::multiset" with linespoints, \
- "speed-all.txt" using 1:3 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-all.txt" using 1:4 title "stx::btree_multiset<4>" with linespoints, \
- "speed-all.txt" using 1:16 title "stx::btree_multiset<32>" with linespoints, \
- "speed-all.txt" using 1:32 title "stx::btree_multiset<64>" with linespoints, \
- "speed-all.txt" using 1:64 title "stx::btree_multiset<128>" with linespoints, \
- "speed-all.txt" using 1:100 title "stx::btree_multiset<200>" with linespoints
+plot "speed-set-find.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multiset" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multiset" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_set" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
+ "speed-set-find.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
### 2nd Plot
-set title "Speed Test Multiset - Insert/Find/Erase (32000-32768000 Items)"
+set title "Speed Test - Finding the Best Slot Size - Find Only - Plotted by Slots in B+ Tree"
-set xrange [30000:38000000]
+set key top right
+set autoscale x
+set xlabel "Leaf/Inner Slots"
+set ylabel "Seconds"
-replot
+plot "speed-set-find.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-set-find.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-set-find.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines
-### 3rd Plot
+################################################################################
-set title "Speed Test Multiset - Normalized Time - Insert/Find/Erase (125-32768000 Items)"
+### Measuring a Sequence of Insert Operations
+
+### 1st Plot
+
+set title "Speed Test Multimap - Normalized Time - Insertion Only (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:38000000]
-set xlabel "Items"
-set ylabel "Microseconds / Item"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
+set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-all.txt" using 1:($2 / $1) * 1000000 title "std::multiset" with linespoints, \
- "speed-all.txt" using 1:($3 / $1) * 1000000 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-all.txt" using 1:($4 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
- "speed-all.txt" using 1:($16 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
- "speed-all.txt" using 1:($32 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
- "speed-all.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
- "speed-all.txt" using 1:($100 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
+plot "speed-map-insert.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multimap" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multimap" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_map" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multimap<4>" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multimap<32>" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multimap<64>" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multimap<128>" with linespoints, \
+ "speed-map-insert.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multimap<200>" with linespoints
-### 4th Plot
+### 2nd Plot
-set title "Speed Test - Finding the Best Slot Size - Insert/Find/Erase - Plotted by Slots in B+ Tree"
+set title "Speed Test - Finding the Best Slot Size - Insertion Only - Plotted by Slots in B+ Tree"
set key top right
set autoscale x
set xlabel "Leaf/Inner Slots"
set ylabel "Seconds"
-unset logscale x
-unset logscale y
-plot "speed-all.trt" using ($0*2 + 4):17 every ::2 title "8192000 Data Pairs" with lines, \
- "speed-all.trt" using ($0*2 + 4):18 every ::2 title "16384000 Data Pairs" with lines, \
- "speed-all.trt" using ($0*2 + 4):19 every ::2 title "32768000 Data Pairs" with lines
+plot "speed-map-insert.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-map-insert.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-map-insert.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines
-### Now Measuring only Find Operations
+### Measuring a Sequence of Insert/Find/Erase Operations
### 1st Plot
-set title "Speed Test Multiset - Find Only (125-32000 Items)"
+set title "Speed Test Multimap - Normalized Time - Insert/Find/Erase (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:34000]
-set xlabel "Data Pairs"
-set ylabel "Seconds"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
+set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-find.txt" using 1:2 title "std::multiset" with linespoints, \
- "speed-find.txt" using 1:3 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-find.txt" using 1:4 title "stx::btree_multiset<4>" with linespoints, \
- "speed-find.txt" using 1:16 title "stx::btree_multiset<32>" with linespoints, \
- "speed-find.txt" using 1:32 title "stx::btree_multiset<64>" with linespoints, \
- "speed-find.txt" using 1:64 title "stx::btree_multiset<128>" with linespoints, \
- "speed-find.txt" using 1:100 title "stx::btree_multiset<200>" with linespoints
+plot "speed-map-all.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multimap" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multimap" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_map" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multimap<4>" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multimap<32>" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multimap<64>" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multimap<128>" with linespoints, \
+ "speed-map-all.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multimap<200>" with linespoints
### 2nd Plot
-set title "Speed Test Multiset - Find Only (32000-32768000 Items)"
+set title "Speed Test - Finding the Best Slot Size - Insert/Find/Erase - Plotted by Slots in B+ Tree"
+
+set key top right
+set autoscale x
+set xlabel "Leaf/Inner Slots"
+set ylabel "Seconds"
-set xrange [30000:38000000]
+plot "speed-map-all.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-map-all.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-map-all.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines
-replot
+### Now Measuring only Find Operations
-### 3rd Plot
+### 1st Plot
-set title "Speed Test Multiset - Normalized Time - Find Only (125-32768000 Items)"
+set title "Speed Test Multimap - Normalized Time - Find Only (125-65536000 Items)"
set key top left
-set logscale x
-set xrange [100:38000000]
-set xlabel "Items"
-set ylabel "Microseconds / Item"
+set xrange [6.5:26.5]
+set xlabel "Items [log2(n)]"
+set ylabel "Microseconds / Insert"
set format x "%.0f"
-plot "speed-find.txt" using 1:($2 / $1) * 1000000 title "std::multiset" with linespoints, \
- "speed-find.txt" using 1:($3 / $1) * 1000000 title " __gnu_cxx::hash_multiset" with linespoints, \
- "speed-find.txt" using 1:($4 / $1) * 1000000 title "stx::btree_multiset<4>" with linespoints, \
- "speed-find.txt" using 1:($16 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints, \
- "speed-find.txt" using 1:($32 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
- "speed-find.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
- "speed-find.txt" using 1:($100 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints
+plot "speed-map-find.txt" using (log($1)/log(2)):($2 / $1) * 1000000 title "std::multimap" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($3 / $1) * 1000000 title "__gnu_cxx::hash_multimap" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($4 / $1) * 1000000 title "std::tr1::unordered_map" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($5 / $1) * 1000000 title "stx::btree_multimap<4>" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($19 / $1) * 1000000 title "stx::btree_multimap<32>" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($35 / $1) * 1000000 title "stx::btree_multimap<64>" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($67 / $1) * 1000000 title "stx::btree_multimap<128>" with linespoints, \
+ "speed-map-find.txt" using (log($1)/log(2)):($103 / $1) * 1000000 title "stx::btree_multimap<200>" with linespoints
-### 4th Plot
+### 2nd Plot
set title "Speed Test - Finding the Best Slot Size - Find Only - Plotted by Slots in B+ Tree"
set key top right
set autoscale x
set xlabel "Leaf/Inner Slots"
set ylabel "Seconds"
-unset logscale x
-unset logscale y
-plot "speed-find.trt" using ($0*2 + 4):17 every ::2 title "8192000 Lookups" with lines, \
- "speed-find.trt" using ($0*2 + 4):18 every ::2 title "16384000 Lookups" with lines, \
- "speed-find.trt" using ($0*2 + 4):19 every ::2 title "32768000 Lookups" with lines
+plot "speed-map-find.trt" using (($0-1)*2 + 4):18 every ::2 title "16384000 Items" with lines, \
+ "speed-map-find.trt" using (($0-1)*2 + 4):19 every ::2 title "32768000 Items" with lines, \
+ "speed-map-find.trt" using (($0-1)*2 + 4):20 every ::2 title "65536000 Items" with lines

0 comments on commit 7355d40

Please sign in to comment.