File tree 3 files changed +43
-2
lines changed
3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 4
4
* .dSYM
5
5
* .cpp
6
6
bench
7
- data /*
7
+ data /*
8
+ * .png
9
+ * .dat
Original file line number Diff line number Diff line change @@ -16,8 +16,13 @@ bench: include/*.hpp bench.cpp data/distinct_1
16
16
$(CPP ) $(CPPOPTS ) bench.cpp -o bench
17
17
./bench ./data/distinct_1 | tee -a bench.dat
18
18
19
+ bench.dat : bench
20
+
21
+ plot : bench.dat
22
+ gnuplot bench.gnuplot
23
+
19
24
test : include/* .hpp test.cpp
20
25
$(CPP ) $(CPPOPTS ) -Ideps/Catch/single_include test.cpp -o test
21
26
22
27
clean :
23
- rm -rdf * .o test bench * .dSYM
28
+ rm -rdf * .o test bench bench.dat * .png * .dSYM
Original file line number Diff line number Diff line change
1
+ set terminal png
2
+
3
+ set output " insert.png"
4
+ set title " Insertion Time"
5
+ set log xy
6
+ set yrange [1 : 10000 ]
7
+ set xrange [10 : 95000 ]
8
+ set xlabel " Items Inserted"
9
+ set ylabel " Ticks To Insert (Best of 10 Consecutive Runs)"
10
+ plot ' bench.dat' using 1 :2 with lines title ' array-hash' , \
11
+ ' bench.dat' using 1 :5 with lines title ' std::map' , \
12
+ ' bench.dat' using 1 :8 with lines title ' std::tr1::unordered_map'
13
+
14
+ set output " query.png"
15
+ set title " Query Time"
16
+ set log xy
17
+ set yrange [1 : 10000 ]
18
+ set xrange [10 : 95000 ]
19
+ set xlabel " Items Queried and Contained"
20
+ set ylabel " Ticks To Query (Best of 10 Consecutive Runs)"
21
+ plot ' bench.dat' using 1 :3 with lines title ' array-hash' , \
22
+ ' bench.dat' using 1 :6 with lines title ' std::map' , \
23
+ ' bench.dat' using 1 :9 with lines title ' std::tr1::unordered_map'
24
+
25
+ set output " random.png"
26
+ set title " Random Query Time"
27
+ set log xy
28
+ set yrange [1 : 10000 ]
29
+ set xrange [10 : 95000 ]
30
+ set xlabel " Items Queried and Contained"
31
+ set ylabel " Ticks To Query (Best of 10 Consecutive Runs)"
32
+ plot ' bench.dat' using 1 :4 with lines title ' array-hash' , \
33
+ ' bench.dat' using 1 :7 with lines title ' std::map' , \
34
+ ' bench.dat' using 1 :10 with lines title ' std::tr1::unordered_map'
You can’t perform that action at this time.
0 commit comments