Skip to content

Commit 3b66b9d

Browse files
committed
Add benchparse README
1 parent 8a40499 commit 3b66b9d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

benchparse/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Benchparse
2+
3+
`benchparse` is a lightweight tool for processing the raw output of golang benchmark runs into useful csvs.
4+
5+
The expected workflow:
6+
```sh
7+
go test -bench=. -count=2 -run=^a > all-benchmark-outputs.out
8+
benchparse all-benchmark-outputs.out out.csv
9+
```
10+
11+
Three derivative values useful for analysis are generated from the benchmark raw outputs: gas cost, effective runtime and time / 1000. Gas cost is derived from constants kept in this package reflecting current network gas pricing. time/1000 gives the benchmark runtime of one operation since each benchmark value is taken from 1000 iterations of a benchmark. Effective runtime is the sum of one operation's benchmark runtime and the expected runtime of the gets and puts geneated by that operation when persisting to disk. Get and put runtime estimations are just gas cost / 10 since 10 gas correspond to 1 nanosecond.
12+
13+
The output csv is of the form
14+
```
15+
hamt-id-a
16+
header1,header2,...
17+
data1,data2,...
18+
19+
hamt-id-b
20+
header1,header2,...
21+
data1,data2,...
22+
23+
...
24+
```

0 commit comments

Comments
 (0)