-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbenchmark.sh
More file actions
executable file
·35 lines (29 loc) · 860 Bytes
/
benchmark.sh
File metadata and controls
executable file
·35 lines (29 loc) · 860 Bytes
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
#!/bin/bash
gencheckBench(){
echo "# GENCHECK $options"
echo "# GENCHECK $options" > "$benchMD"
echo "\`\`\`" >> "$benchMD"
f="-f=./internal/benchmark/types.go"
if [[ -n $options ]]; then
./bin/gencheck "$f" "$options"
else
./bin/gencheck "$f"
fi
go test -v -run=XXX -bench=BenchmarkCompareGencheck -benchmem ./internal/benchmark >> "$benchMD"
echo "\`\`\`" >> "$benchMD"
}
benchMD=benchmark_nooptions.md
options=
gencheckBench
benchMD=benchmark_noprealloc.md
options="--noprealloc"
gencheckBench
benchMD=benchmark_failfast.md
options="--failfast"
gencheckBench
benchMD=benchmark_playground.md
echo "# PLAYGROUND"
echo "# PLAYGROUND" > "$benchMD"
echo "\`\`\`" >> "$benchMD"
go test -v -run=XXX -bench=BenchmarkComparePlayground -benchmem ./internal/benchmark >> "$benchMD"
echo "\`\`\`" >> "$benchMD"