Skip to content

Commit 8ed970a

Browse files
committed
scripts: improve stress.sh
We extend the stress time for certain packages that are more important and have more/slower tests.
1 parent ff737ac commit 8ed970a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

scripts/stress.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,30 @@
22

33
set -euo pipefail
44

5+
# The GitHub Action runner has 4 cores. Use 3 processes to get good utilization
6+
# but not slow down things too much.
7+
# TODO(radu): replace with a percentage when stress supports it.
8+
PARALLEL="3"
9+
510
# Stress all packages, one at a time. This allows for a more useful output.
611
for p in $(go list ./... | sed 's#github.com/cockroachdb/pebble#.#'); do
712
echo
813
echo ""
914
echo ""
1015
echo "Stressing $p"
1116
echo ""
12-
make stress STRESSFLAGS='-maxtime 5m -maxruns 100' "PKG=$p"
17+
case "$p" in
18+
.|./internal/manifest|./sstable|./wal)
19+
# These packages have a lot of state space to cover, so we give them more
20+
# time.
21+
MAX_TIME=30m
22+
MAX_RUNS=100
23+
;;
24+
*)
25+
MAX_TIME=5m
26+
MAX_RUNS=100
27+
;;
28+
esac
29+
echo "make stress STRESSFLAGS=\"-maxtime $MAX_TIME -maxruns $MAX_RUNS -p $PARALLEL\" PKG=\"$p\""
30+
make stress STRESSFLAGS="-maxtime $MAX_TIME -maxruns $MAX_RUNS -p $PARALLEL" PKG="$p"
1331
done

0 commit comments

Comments
 (0)