diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-03-17 13:07:01 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-03-22 12:02:08 +0000 |
commit | f8c64dd09a2e99af95c4a739b706e958d6f16d8a (patch) | |
tree | 99fbd184a67250f2b827c3882c5d15be25e285b0 /tcwg_bmk-build.sh | |
parent | 8b1f705fb3f331013cc14402bb199248a17ce7c2 (diff) |
round-robin.sh: Avoid changing top-level artifacts in no_regression_p predicate
The no_regression_p() predicate function is called from two steps:
check_regression and update_baseline. While we want no_regression_p
to output regression info during check_regression step, we don't want
that during update_baseline (during update_baseline no_regression_p
is called to compare current results against pre-baseline ones).
To fix the above we generate regression information in artifacts
directory of the current step, and copy it to the top-level only
during check_regression step.
Change-Id: Ib03d82f7afe60c406c7942f2fa086855df371171
Diffstat (limited to 'tcwg_bmk-build.sh')
-rwxr-xr-x | tcwg_bmk-build.sh | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index 4beb2958..3fd24129 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -252,7 +252,6 @@ compare_results () local ref_results_id="$1" local new_results_id="$2" local cmp_options="$3" - local annotate_results="$4" local results_ref results_new results_ref=$(cat $ref_results_id) @@ -314,9 +313,7 @@ compare_results () esac if ! [ "$metric" -le "$threshold" ]; then result=100 - if $annotate_results; then - echo "# $bmk,$symbol regressed by $metric" >> $run_step_top_artifacts/results - fi + echo "# $bmk,$symbol regressed by $metric" >> $run_step_artifacts/results.regressions else result=1 fi @@ -350,7 +347,7 @@ no_regression_vs_p () if ! [ -f "$ref_artifacts/results_id-1" -a -f "$ref_artifacts/results_id-2" ]; then return 0 fi - compare_results "$ref_artifacts/results_id-1" "$ref_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" false + compare_results "$ref_artifacts/results_id-1" "$ref_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" for i in $(find $run_step_artifacts/ -type f -name "results*"); do mv $i $(dirname $i)/ref-$(basename $i) done @@ -359,7 +356,7 @@ no_regression_vs_p () if ! [ -f "$new_artifacts/results_id-1" -a -f "$new_artifacts/results_id-2" ]; then return 1 fi - compare_results "$new_artifacts/results_id-1" "$new_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" false + compare_results "$new_artifacts/results_id-1" "$new_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" for i in $(find $run_step_artifacts/ -type f -name "results*"); do mv $i $(dirname $i)/new-$(basename $i) done @@ -391,14 +388,16 @@ no_regression_vs_p () # a regression. status=0 prev_bmk="" - echo "" > $new_artifacts/regressions.txt + echo "" > $run_step_artifacts/regressions.txt + # Delete results.regressions generated by compare_results() calls above. + rm -f $run_step_artifacts/results.regressions while IFS=, read -a arr; do bmk=${arr[0]} symbol=${arr[1]} result=${arr[2]} if ! [ "$result" -le "5000" ]; then - echo "Regression in $bmk,$symbol" | tee -a $new_artifacts/regressions.txt - echo "# $bmk,$symbol regressed" >> $new_artifacts/results + echo "Regression in $bmk,$symbol" | tee -a $run_step_artifacts/regressions.txt + echo "# $bmk,$symbol regressed" >> $run_step_artifacts/results.regressions status=1 if [ x"$bmk" != x"$prev_bmk" ]; then bisect_bmks+=("++benchmarks" "$bmk") @@ -433,7 +432,7 @@ no_regression_to_base_p () case "${cflags[0]}" in *"_LTO"*) compare_opts="--num_symbols 0 --entry_threshold 10" ;; esac - compare_results "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts" true + compare_results "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts" local bmk symbol result status prev_bmk local -a bisect_bmks @@ -443,10 +442,10 @@ no_regression_to_base_p () # a regression. status=0 prev_bmk="" - echo "" > $new_artifacts/regressions.txt + echo "" > $run_step_artifacts/regressions.txt while IFS=, read -r bmk symbol result; do if ! [ "$result" -le "50" ]; then - echo "Regression in $bmk,$symbol" | tee -a $new_artifacts/regressions.txt + echo "Regression in $bmk,$symbol" | tee -a $run_step_artifacts/regressions.txt status=1 if [ x"$bmk" != x"$prev_bmk" ]; then bisect_bmks+=("++benchmarks" "$bmk") |