on master help sign in
Hide --commit-compare for now
commit8f69a6b0feccefcf70bf2191f46439e4b5c592f5 authorHarendra Kumar <harendra@composewell.com> dateMon 29 Nov 2021, 07:59 (5 years ago) parentf9e26f6
1 file changed+12−8
benchmark/bench-report/bin/bench-runner.sh+12−8
benchmark/bench-report/bin/bench-runner.sh+12−8
@@ -34,7 +34,7 @@ print_help () {
3434 echo " [--with-compiler <compiler exe name>]"
3535 echo " [--cabal-build-options <options>]"
3636 echo " [--rtsopts <opts>]"
37− echo " [--commit-compare] [--base <commit>] [--candidate <commit>]"
37+ #echo " [--commit-compare] [--base <commit>] [--candidate <commit>]"
3838 #echo " -- <gauge options or benchmarks>"
3939 echo
4040 echo "--benchmarks: benchmarks to run, use 'help' for list of benchmarks"
@@ -56,10 +56,10 @@ print_help () {
5656 echo "bench.sh --benchmarks Data.Parser -- Data.Parser/o-1-space "
5757 echo "restricts Heap/Stack space for O(1) characterstics"
5858 echo
59− echo "When using --commit-compare, by default comparative chart of HEAD^ vs HEAD"
60− echo "commit is generated, in the 'charts' directory."
61− echo "Use --base and --candidate to select the commits to compare."
62− echo
59+ #echo "When using --commit-compare, by default comparative chart of HEAD^ vs HEAD"
60+ #echo "commit is generated, in the 'charts' directory."
61+ #echo "Use --base and --candidate to select the commits to compare."
62+ #echo
6363 #echo "Any arguments after a '--' are passed directly to gauge"
6464 exit
6565}
@@ -383,16 +383,20 @@ run_benches_comparing() {
383383 fi
384384 echo "Comparing baseline commit [$BASE] with candidate [$CANDIDATE]"
385385 echo "Checking out base commit [$BASE] for benchmarking"
386+ # XXX git checkout will overwrite this script itself and the scripts
387+ # imported/used by this script.
386388 git checkout "$BASE" || die "Checkout of base commit [$BASE] failed"
387389
388− $BUILD_BENCH || die "build failed"
390+ # $BUILD_BENCH || die "build failed"
391+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
389392 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
390393
391394 echo "Checking out candidate commit [$CANDIDATE] for benchmarking"
392395 git checkout "$CANDIDATE" || \
393396 die "Checkout of candidate [$CANDIDATE] commit failed"
394397
395− $BUILD_BENCH || die "build failed"
398+ # $BUILD_BENCH || die "build failed"
399+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
396400 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
397401 # XXX reset back to the original commit
398402}
@@ -417,6 +421,7 @@ run_measurements() {
417421
418422 if test "$COMMIT_COMPARE" = "0"
419423 then
424+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
420425 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
421426 else
422427 run_benches_comparing "$bench_list"
@@ -613,7 +618,6 @@ fi
613618BUILD_BENCH="$CABAL_EXECUTABLE v2-build $BUILD_FLAGS $CABAL_BUILD_OPTIONS --enable-benchmarks"
614619if test "$MEASURE" = "1"
615620then
616− run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
617621 run_measurements "$TARGETS"
618622fi
619623