on master help sign in
Introduce a --silent option that supresses many messages
commit27397f36b4ff56b31005f58980dc5398fee13214 authorAdithya Kumar <adithya@composewell.com> dateThu 27 Jan 2022, 03:33 (5 years ago) parent84456c1
1 file changed+6−4
benchmark/bench-report/bin/bench-runner.sh+6−4
benchmark/bench-report/bin/bench-runner.sh+6−4
@@ -23,6 +23,7 @@ print_help () {
2323 echo " [--diff-style <absolute|percent|multiples>]"
2424 echo " [--cutoff-percent <percent-value>]"
2525 echo " [--graphs]"
26+ echo " [--silent]"
2627 echo " [--no-measure]"
2728 echo " [--append]"
2829 echo " [--long]"
@@ -111,7 +112,7 @@ build_report_progs() {
111112 local prog
112113 prog=$BENCH_REPORT_DIR/bin/bench-report
113114 test -x $prog || die "Cannot find bench-report executable"
114− echo "Using bench-report executable [$prog]"
115+ test -z "$SILENT" && echo "Using bench-report executable [$prog]"
115116 fi
116117}
117118
@@ -432,11 +433,11 @@ run_reports() {
432433 local prog
433434 prog=$BENCH_REPORT_DIR/bin/bench-report
434435 test -x $prog || die "Cannot find bench-report executable"
435− echo
436+ test -z "$SILENT" && echo
436437
437438 for i in $1
438439 do
439− echo "Generating reports for ${i}..."
440+ test -z "$SILENT" && echo "Generating reports for ${i}..."
440441 $prog \
441442 --benchmark $i \
442443 $(test "$USE_GAUGE" = 1 && echo "--use-gauge") \
@@ -497,6 +498,7 @@ do
497498 --diff-cutoff-percent) shift; BENCH_CUTOFF_PERCENT=$1; shift ;;
498499 # flags
499500 --slow) SLOW=1; shift ;;
501+ --silent) SILENT=1; shift ;;
500502 --quick) QUICK_MODE=1; shift ;;
501503 --compare) COMPARE=1; shift ;;
502504 --commit-compare) COMMIT_COMPARE=1; shift ;;
@@ -598,7 +600,7 @@ TARGETS=$(set_targets)
598600TARGETS_ORIG=$TARGETS
599601TARGETS=$(only_real_benchmarks)
600602
601−echo "Using benchmark suites [$TARGETS]"
603+test -z "$SILENT" && echo "Using benchmark suites [$TARGETS]"
602604
603605#-----------------------------------------------------------------------------
604606# Build reporting utility