Add benchmark script mentioned in README.md

This commit is contained in:
Demi M. Obenour 2018-12-16 14:07:52 -05:00
parent f949219a32
commit 287ed8bb5e
No known key found for this signature in database
GPG Key ID: B288B55FFF9C22C1
1 changed files with 14 additions and 0 deletions

14
bench.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh --
set -euf
unset IFS RUST_BACKTRACE
if test $# -ne 1; then
printf 'Must have exactly one argument\n' >&2; exit 1
fi
case $1 in
(*[!a-f0-9]*) printf 'Invalid character in hex argument\n' >&2; exit 1;;
esac
if test "$((${#1} & 1))" -ne 0; then
printf 'Argument must be of even length\n' >&2; exit 1
fi
VDF_BENCHMARK_SEED=$1 cargo bench -p vdf --bench classgroup-bench