mirror of
https://github.com/mgree/ffs.git
synced 2024-08-17 15:20:43 +03:00
Benchmarks, in two flavors: real-world benchmarks and synthetic microbenchmarks. `--time` flag for benchmarking output on stderr. Using R to generate pretty graphs. Some overhaul of build scripts and artifacts, with the hope of simplifying the release system.
30 lines
788 B
Bash
Executable File
30 lines
788 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# the log format for micro benchmark has a bunch of information nested in the filename
|
|
# here we break it apart so that we can generate appropriate charts
|
|
|
|
[ "$#" -eq 1 ] && [ -f "$1" ] || {
|
|
echo "Usage: $(basename $0) [BENCHMARK LOG]" >&2
|
|
echo >&2
|
|
echo " see run_bench.sh in the repo root" >&2
|
|
exit 2
|
|
}
|
|
|
|
group=$(mktemp)
|
|
name=$(mktemp)
|
|
info=$(mktemp)
|
|
rest=$(mktemp)
|
|
|
|
cat $1 | cut -f 1 -d ',' >$group
|
|
cat $1 | cut -f 2 -d ',' >$name
|
|
|
|
# take the filename and break it up; we need to emit a new header field, too
|
|
echo kind,direction,magnitude >$info
|
|
tail -n +2 $name | sed s/_/,/g | sed s/.json// >>$info
|
|
|
|
cat $1 | cut -f 3,4,5,6 -d ',' >$rest
|
|
|
|
paste -d ',' $group $name $info $rest
|
|
|
|
rm $group $name $info $rest
|