cmd/bent: fix overlapping output lines that broke "shortname:"
This fix also separates benchmark runs with blank lines, which looks
a whole darn lot better.
Change-Id: I39b4ef42c742b253ced4294872f9a07de022f136
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/462717
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/cmd/bent/bent.go b/cmd/bent/bent.go
index d4de8dd..0c722c9 100644
--- a/cmd/bent/bent.go
+++ b/cmd/bent/bent.go
@@ -948,6 +948,11 @@
maxrc := 0
+ if verbose == 0 {
+ // Terminate any "...." printed before so that benchmarking info will have a new line.
+ fmt.Println()
+ }
+
// N repetitions for each configurationm, run all the benchmarks.
// TODO randomize the benchmarks and configurations, like for builds.
for i := 0; i < N; i++ {
@@ -1028,6 +1033,7 @@
cmd.Args = append(cmd.Args, moreArgs...)
cmd.Args = sliceExpandEnv(cmd.Args, cmd.Env)
+ config.say("\n") // force a newline, there may have been loggy-gunk before this.
config.say("shortname: " + b.Name + "\n")
config.say("toolchain: " + config.Name + "\n")
s, rc = todo.Configurations[j].runBinary(dirs.wd, cmd, false)
@@ -1057,6 +1063,7 @@
cmd.Args = append(cmd.Args, moreArgs...)
cmd.Args = sliceExpandEnv(cmd.Args, runEnv)
+ config.say("\n") // force a newline, there may have been loggy-gunk before this.
config.say("shortname: " + b.Name + "\n")
config.say("toolchain: " + config.Name + "\n")
s, rc = todo.Configurations[j].runBinary(dirs.wd, cmd, false)