diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-03-17 13:31:37 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-03-22 12:02:08 +0000 |
commit | 271be43175ac464ec52b009ab70d952167512aef (patch) | |
tree | 59330ffc32352ce6976b2ef146a689ea964a3151 /tcwg_bmk-build.sh | |
parent | e29d5266a3231813407abda45065d8a7fda4225f (diff) |
tcwg_bmk-build.sh: Simplify no_regression_to_base_p
Use results.regressions generated by compare_results() to report
regression or success.
Change-Id: Ieda1532411a49b05a5831d9802a476e92bab152b
Diffstat (limited to 'tcwg_bmk-build.sh')
-rwxr-xr-x | tcwg_bmk-build.sh | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index d09c45bb..ded71c84 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -286,11 +286,13 @@ compare_results () esac local -a arr - local bmk symbol time size result + local bmk symbol time size result prev_bmk echo "bmk,symbol,result" > $run_step_artifacts/results-compare.csv + printf "extra_build_params=" > $run_step_artifacts/extra-bisect-params # Read result lines from <(tail -n +2 ...) below. # "-n +2" is to skip the header line. + prev_bmk="" while IFS=, read -a arr; do bmk=${arr[0]} symbol=${arr[1]} @@ -314,12 +316,17 @@ compare_results () if ! [ "$metric" -le "$threshold" ]; then result=100 echo "# $bmk,$symbol regressed by $metric" >> $run_step_artifacts/results.regressions + if [ x"$bmk" != x"$prev_bmk" ]; then + printf "++benchmarks $bmk " >> $run_step_artifacts/extra-bisect-params + prev_bmk="$bmk" + fi else result=1 fi echo "$bmk,$symbol,$result" >> $run_step_artifacts/results-compare.csv fi done < <(tail -n +2 $run_step_artifacts/results.csv) + printf "\n" >> $run_step_artifacts/extra-bisect-params ) } @@ -431,26 +438,10 @@ no_regression_to_base_p () *"_LTO"*) compare_opts="--num_symbols 0 --entry_threshold 10" ;; esac compare_results "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts" - - local bmk symbol result status prev_bmk - local -a bisect_bmks - - # Read result lines from <(tail -n +2 ...) below. - # "-n +2" is to skip the header line. Set $status to "1" if there is - # a regression. - status=0 - prev_bmk="" - while IFS=, read -r bmk symbol result; do - if ! [ "$result" -le "50" ]; then - status=1 - if [ x"$bmk" != x"$prev_bmk" ]; then - bisect_bmks+=("++benchmarks" "$bmk") - prev_bmk="$bmk" - fi - fi - done < <(tail -n +2 $run_step_artifacts/results-compare.csv) - echo "extra_build_params=${bisect_bmks[@]}" > $run_step_artifacts/extra-bisect-params - return $status + if [ -f $run_step_artifacts/results.regressions ]; then + return 1 + fi + return 0 ) } |