Skip to content

Commit d8c79fe

Browse files
authored
repeat-perf-test: allow specifying adapters (#8911)
1 parent d0eee19 commit d8c79fe

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

bin/repeat-perf-test.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [[ "$#" -lt 1 ]]; then
3737
Repeatedly run the performance test suite against one or more versions of the codebase.
3838
3939
USAGE
40-
[PERF_REPEATS=<N>] $0 ...tree-ish
40+
[PERF_REPEATS=<N>] $0 ...tree-ish:adapter
4141
4242
EOF
4343
exit 1
@@ -52,10 +52,13 @@ fi
5252
log
5353
declare -a commits
5454
i=0
55-
for treeish in "$@"; do
55+
for treeish_adapter in "$@"; do
56+
adapter="${treeish_adapter#*:}"
57+
treeish="${treeish_adapter%:*}"
58+
adapters[i]="$adapter"
5659
commits[i]="$(git rev-parse "$treeish")"
5760
description="$(git show --oneline --no-patch "$treeish")"
58-
log " $((i=i+1)). $description ($treeish)"
61+
log " $((i=i+1)). $adapter: $description ($treeish)"
5962
done
6063
log
6164
log "!!! This may cause strange issues if you have uncomitted changes. !!!"
@@ -91,13 +94,16 @@ npm_install # in case of different deps on different branches
9194
npm run build-test
9295

9396
iterate_tests() {
94-
for commit in "${commits[@]}"; do
95-
log "Running perf tests on $commit..."
97+
for i in "${!commits[@]}"; do
98+
commit="${commits[$i]}"
99+
adapter="${adapters[$i]}"
100+
log "Running perf tests on $commit with adapter-$adapter..."
96101
SRC_ROOT="../../dist-bundles/$commit" \
97102
JSON_REPORTER=1 \
98103
PERF=1 \
99104
USE_MINIFIED=1 \
100105
MANUAL_DEV_SERVER=1 \
106+
ADAPTERS="$adapter" \
101107
node ./bin/test-browser.js
102108

103109
sleep 1

0 commit comments

Comments
 (0)