File: stress.sh

package info (click to toggle)
sortedcontainers 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 11,136 kB
  • sloc: python: 6,613; sh: 60; makefile: 18
file content (30 lines) | stat: -rwxr-xr-x 724 bytes parent folder | download | duplicates (5)
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
#!/bin/bash
trap "exit" INT

OFFSET=1
ITER=10000
LOOP=1
PARALLEL=8

start=$(date +"%s")

rm output.txt

for runtime in 27 35; do (
    for name in sortedlist sorteddict sortedset; do (
        for j in $(seq 1 $LOOP); do (
            for i in $(seq 1 $PARALLEL); do (
                echo ". env$runtime/bin/activate && python -m tests.test_stress_$name $ITER $OFFSET$runtime$j$i >> output.txt 2>&1" | tee -a output.txt | bash
            ) & done
            wait
        ) done
    ) done
) done

cat output.txt

end=$(date +"%s")
diff=$(($end - $start))
echo "$(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed."
diff=$(($diff * $PARALLEL))
echo "$(($diff / 60)) minutes and $(($diff % 60)) seconds of stress."