jade
f4fc2b5d10
These scripts were originally written by horrors, and have since been
hacked up a lot by jade. We are putting them up as a CL since it is
better to have checked in benchmarking scripts than to not have
benchmarking scripts.
cc: #23
Co-authored-by: eldritch horrors <pennae@lix.systems>
Change-Id: I95c2f9d24753ac468944c5781deec9508fd5cb8c
23 lines
588 B
Plaintext
Executable file
23 lines
588 B
Plaintext
Executable file
#!/usr/bin/env -S jq -Mrf
|
|
|
|
def round3:
|
|
. * 1000 | round | . / 1000
|
|
;
|
|
|
|
def stats($first):
|
|
[
|
|
" mean: \(.mean | round3)s ± \(.stddev | round3)s",
|
|
" user: \(.user | round3)s | system: \(.system | round3)s",
|
|
" median: \(.median | round3)s",
|
|
" range: \(.min | round3)s ... \(.max | round3)s",
|
|
" relative: \(.mean / $first.mean | round3)"
|
|
]
|
|
| join("\n")
|
|
;
|
|
|
|
def fmt($first):
|
|
"\(.command)\n" + (. | stats($first))
|
|
;
|
|
|
|
[.results | .[0] as $first | .[] | fmt($first)] | join("\n\n") | (. + "\n\n---\n")
|