summaryrefslogtreecommitdiff
path: root/stress
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-03-13 10:38:42 +0200
committerLars Wirzenius <liw@liw.fi>2020-03-13 10:53:33 +0200
commit251d146c53c9269d28633549a2d822507effad03 (patch)
tree4f986540313402da2879b7a4c375dfc13584b69d /stress
parent57189f39c09d5e39cb44347cf86da827d6383019 (diff)
downloadsubplot-251d146c53c9269d28633549a2d822507effad03.tar.gz
Add: simplistic stress test
Diffstat (limited to 'stress')
-rwxr-xr-xstress23
1 files changed, 23 insertions, 0 deletions
diff --git a/stress b/stress
new file mode 100755
index 0000000..6ad04ae
--- /dev/null
+++ b/stress
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -eu
+
+NSCEN=1000
+NSTEP=100
+
+ts() {
+ local start="$1"
+ local now="$(date +%s)"
+ echo "$now - $start" | bc
+}
+
+start="$(ts 0)"
+
+./stressgen s "$NSCEN" "$NSTEP"
+echo "generate: $(ts "$start")"
+
+cargo run -q --bin sp-docgen -- s.md -o s.pdf
+echo "docgen: $(ts "$start")"
+
+cargo run -q --bin sp-codegen -- s.md -o test.py --run > /dev/null
+echo "codegen: $(ts "$start")"