forked from skiplang/skip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bench
executable file
·20 lines (18 loc) · 889 Bytes
/
bench
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -e
# Usage: ./bench [src1.sk src2.sk...] path/to/benchmark_program_unit [--backend ['native', 'js']] [...benchmark options]
#
# optional --backend arg is the backend used to compile the benchmark (native, js).
#
# The optional .sk files are library code to be compiled with the benchmark.
#
# The last positional argument is the benchmark file or program unit.
#
# [...benchmark options] are any flags to pass to to Skip bencher, including:
# --display-output => when included, benchmark results will be printed to stdout
# --output => path to json file in which to dump result output
# --min-iterations => minimum number of iterations to run per benchmark
# --iters-per-gc => maximum number of benchmark iterations to run before
# forcing garbage collection
DIR=$(dirname "$0")
TOOLS="$DIR/tests/runtime/tools"
exec "$TOOLS/bench" $@