perf: reduce number of times the query will run

Before this patch:

- upstream/master and PR's *with* perf tests or pef scripts changes:
  --runs=13 --max-queries=0

- PRs *without* perf changes:
  --runs=7 --max-queries=20

- PRs w/ only perf tests changes:
  --runs-13 --max-queries=0 <list of perf tests>

After:

- upstream/master and PR's *with* perf tests changes:
  --runs=13 --max-queries=0

- PRs *without* perf changes:
  --runs=7 --max-queries=10

- PRs w/ only perf tests changes:
  --runs-13 --max-queries=0 <list of perf tests>

So to underline, now we will not look at perf scripts changes anymore,
and we will also decrease number of random queries to run to 10.
This commit is contained in:
Azat Khuzhin 2021-10-27 22:26:10 +03:00
parent 7957079f95
commit 9eef2ad0c2
2 changed files with 7 additions and 9 deletions

View File

@ -196,7 +196,6 @@ function run_tests
test_files=$(ls "$test_prefix" | grep "$CHPC_TEST_GREP" | xargs -I{} -n1 readlink -f "$test_prefix/{}")
elif [ "$PR_TO_TEST" -ne 0 ] \
&& [ "$(wc -l < changed-test-definitions.txt)" -gt 0 ] \
&& [ "$(wc -l < changed-test-scripts.txt)" -eq 0 ] \
&& [ "$(wc -l < other-changed-files.txt)" -eq 0 ]
then
# If only the perf tests were changed in the PR, we will run only these
@ -208,15 +207,15 @@ function run_tests
test_files=$(ls "$test_prefix"/*.xml)
fi
# For PRs w/o changes in test definitons and scripts, test only a subset of
# queries, and run them less times. If the corresponding environment variables
# are already set, keep those values.
if [ "$PR_TO_TEST" -ne 0 ] \
&& [ "$(wc -l < changed-test-definitions.txt)" -eq 0 ] \
&& [ "$(wc -l < changed-test-scripts.txt)" -eq 0 ]
# For PRs w/o changes in test definitons, test only a subset of queries,
# and run them less times. If the corresponding environment variables are
# already set, keep those values.
#
# NOTE: too high CHPC_RUNS/CHPC_MAX_QUERIES may hit internal CI timeout.
if [ "$PR_TO_TEST" -ne 0 ] && [ "$(wc -l < changed-test-definitions.txt)" -eq 0 ]
then
CHPC_RUNS=${CHPC_RUNS:-7}
CHPC_MAX_QUERIES=${CHPC_MAX_QUERIES:-20}
CHPC_MAX_QUERIES=${CHPC_MAX_QUERIES:-10}
else
CHPC_RUNS=${CHPC_RUNS:-13}
CHPC_MAX_QUERIES=${CHPC_MAX_QUERIES:-0}

View File

@ -102,7 +102,6 @@ then
base=$(git -C right/ch merge-base pr origin/master)
git -C right/ch diff --name-only "$base" pr -- . | tee all-changed-files.txt
git -C right/ch diff --name-only "$base" pr -- tests/performance | tee changed-test-definitions.txt
git -C right/ch diff --name-only "$base" pr -- docker/test/performance-comparison | tee changed-test-scripts.txt
git -C right/ch diff --name-only "$base" pr -- :!tests/performance :!docker/test/performance-comparison | tee other-changed-files.txt
fi