aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchmarks/by-n/run.sh
diff options
context:
space:
mode:
authorMarvin Borner2024-02-29 14:56:18 +0100
committerMarvin Borner2024-02-29 14:56:18 +0100
commitd64bbff1f00e31a92031a44395958a360c93171b (patch)
treeb92266b3def06f4142d621e52752eddf85679320 /benchmarks/by-n/run.sh
parentb13bc3379a46cc5e45eeede0537f0da323410d85 (diff)
Added benchmarks
Diffstat (limited to 'benchmarks/by-n/run.sh')
-rwxr-xr-xbenchmarks/by-n/run.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/benchmarks/by-n/run.sh b/benchmarks/by-n/run.sh
new file mode 100755
index 0000000..65f7af8
--- /dev/null
+++ b/benchmarks/by-n/run.sh
@@ -0,0 +1,11 @@
+#!/bin/env sh
+
+rm -rf temp.bruijn *.json
+for file in $(find . -type f -name "*.bruijn" | sort); do
+ echo "testing $file"
+ spec=$(head -n 1 "$file")
+ range=${spec#??}
+ nseq=$(seq -s, $range) # requires splitting, no quotes!
+ reducers=$(find ../../src/Reducer/ -type f -name "*.hs" -exec basename {} .hs \; | paste -sd, -)
+ hyperfine --export-json "$file.json" --warmup 3 -r 3 -L REDUCER "$reducers" -L N $nseq "BENCH_N={N} envsubst <$file >temp.bruijn; bruijn -y -r {REDUCER} temp.bruijn </dev/null &>/dev/null;"
+done