summaryrefslogtreecommitdiff
path: root/stress
blob: e4644969b6ac8121a415694b702e12d16cc824b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

set -eu

NSCEN=1000
NSTEP=100

if [ "$#" = 2 ]
then
    NSCEN="$1"
    NSTEP="$2"
fi

ts() {
    local start="$1"
    local now="$(date +%s)"
    echo "$now - $start" | bc
}

start="$(ts 0)"

./stressgen s "$NSCEN" "$NSTEP"
gen="$(ts "$start")"

cargo run -q --bin sp-docgen -- s.md -o s.pdf
doc="$(ts "$start")"

cargo run -q --bin sp-codegen -- s.md -o test.py
code="$(ts "$start")"

python3 ./test.py > /dev/null
run="$(ts "$start")"

printf "| %8d | %8d | %8d | %8d | %8d | %8d |\n" \
       "$NSCEN" "$NSTEP" "$gen" "$doc" "$code" "$run"