File: speedtest.gnuplot

package info (click to toggle)
stx-btree 0.8.3-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,948 kB
  • ctags: 6,441
  • sloc: cpp: 6,251; sh: 3,674; makefile: 161; awk: 16; xml: 9
file content (189 lines) | stat: -rwxr-xr-x 7,385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#!/usr/bin/env gnuplot

set terminal pdf
set output 'speedtest.pdf'

# for generating smaller images:
# set terminal pdf size 4, 2.4

### 1st Plot

set title "Speed Test Multiset - Absolute Time - Insertion Only (125-8000 Items)"
set key top left
set logscale x
set xrange [100:10000]
set xlabel "Inserts"
set ylabel "Seconds"
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:32 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-insert.txt" using 1:64 title "stx::btree_multiset<64>" with linespoints, \
     "speed-insert.txt" using 1:128 title "stx::btree_multiset<128>" with linespoints, \
     "speed-insert.txt" using 1:200 title "stx::btree_multiset<200>" with linespoints	

### 2nd Plot

set title "Speed Test Multiset - Absolute Time - Insertion Only (16000-4096000 Items)"

set xrange [10000:5000000]

replot

### 3rd Plot

set title "Speed Test Multiset - Normalized Time - Insertion Only (125-4096000 Items)"
set key top left
set logscale x
set xrange [100:5000000]
set xlabel "Inserts"
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:($32 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-insert.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
     "speed-insert.txt" using 1:($128 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
     "speed-insert.txt" using 1:($200 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints	

### 4th Plot

set title "Speed Test - Finding the Best Slot Size - Insertion Only - Plotted by Leaf/Inner 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 + 4):14 every ::2 title "1024000 Inserts" with lines, \
     "speed-insert.trt" using ($0 + 4):15 every ::2 title "2048000 Inserts" with lines, \
     "speed-insert.trt" using ($0 + 4):16 every ::2 title "4096000 Inserts" with lines

### Now Measuring a Sequence of Insert/Find/Erase Operations

### 1st Plot

set title "Speed Test Multiset - Insert/Find/Erase (125-8000 Items)"
set key top left
set logscale x
set xrange [100:10000]
set xlabel "Data Pairs"
set ylabel "Seconds"
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:32 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-all.txt" using 1:64 title "stx::btree_multiset<64>" with linespoints, \
     "speed-all.txt" using 1:128 title "stx::btree_multiset<128>" with linespoints, \
     "speed-all.txt" using 1:200 title "stx::btree_multiset<200>" with linespoints	

### 2nd Plot

set title "Speed Test Multiset - Insert/Find/Erase (16000-4096000 Items)"

set xrange [10000:5000000]

replot

### 3rd Plot

set title "Speed Test Multiset - Normalized Time - Insert/Find/Erase (125-4096000 Items)"
set key top left
set logscale x
set xrange [100:5000000]
set xlabel "Items"
set ylabel "Microseconds / Item"
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:($32 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-all.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
     "speed-all.txt" using 1:($128 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
     "speed-all.txt" using 1:($200 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints	

### 4th Plot

set title "Speed Test - Finding the Best Slot Size - Insert/Find/Erase - Plotted by Leaf/Inner 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 + 4):14 every ::2 title "1024000 Data Pairs" with lines, \
     "speed-all.trt" using ($0 + 4):15 every ::2 title "2048000 Data Pairs" with lines, \
     "speed-all.trt" using ($0 + 4):16 every ::2 title "4096000 Data Pairs" with lines


### Now Measuring only Find Operations

### 1st Plot

set title "Speed Test Multiset - Find Only (125-8000 Items)"
set key top left
set logscale x
set xrange [100:10000]
set xlabel "Data Pairs"
set ylabel "Seconds"
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:32 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-find.txt" using 1:64 title "stx::btree_multiset<64>" with linespoints, \
     "speed-find.txt" using 1:128 title "stx::btree_multiset<128>" with linespoints, \
     "speed-find.txt" using 1:200 title "stx::btree_multiset<200>" with linespoints	

### 2nd Plot

set title "Speed Test Multiset - Find Only (16000-4096000 Items)"

set xrange [10000:5000000]

replot

### 3rd Plot

set title "Speed Test Multiset - Normalized Time - Find Only (125-4096000 Items)"
set key top left
set logscale x
set xrange [100:5000000]
set xlabel "Items"
set ylabel "Microseconds / Item"
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:($32 / $1) * 1000000 title "stx::btree_multiset<32>" with linespoints,  \
     "speed-find.txt" using 1:($64 / $1) * 1000000 title "stx::btree_multiset<64>" with linespoints, \
     "speed-find.txt" using 1:($128 / $1) * 1000000 title "stx::btree_multiset<128>" with linespoints, \
     "speed-find.txt" using 1:($200 / $1) * 1000000 title "stx::btree_multiset<200>" with linespoints	

### 4th Plot

set title "Speed Test - Finding the Best Slot Size - Find Only - Plotted by Leaf/Inner 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 + 4):14 every ::2 title "1024000 Data Pairs" with lines, \
     "speed-find.trt" using ($0 + 4):15 every ::2 title "2048000 Data Pairs" with lines, \
     "speed-find.trt" using ($0 + 4):16 every ::2 title "4096000 Data Pairs" with lines