From: Katie Hockman Date: Fri, 4 Feb 2022 22:02:49 +0000 (-0500) Subject: internal/fuzz: change meaning of "total" in output X-Git-Tag: go1.18rc1~101 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f9763a648bbe4468118b95e147bc5e81268d0341;p=gostls13.git internal/fuzz: change meaning of "total" in output Fixes #51023 Change-Id: I7dd9f7c696e15ba9c6c887d4c4e0f4d281a82b17 Reviewed-on: https://go-review.googlesource.com/c/go/+/383414 Trust: Katie Hockman Reviewed-by: Roland Shoemaker Reviewed-by: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot --- diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go index 0014cde04f..3ccf74745f 100644 --- a/src/internal/fuzz/fuzz.go +++ b/src/internal/fuzz/fuzz.go @@ -597,7 +597,7 @@ type coordinator struct { // interestingCount is the number of unique interesting values which have // been found this execution. - interestingCount int64 + interestingCount int // warmupInputCount is the count of all entries in the corpus which will // need to be received from workers to run once during warmup, but not fuzz. @@ -731,8 +731,8 @@ func (c *coordinator) logStats() { } else { rate := float64(c.count-c.countLastLog) / now.Sub(c.timeLastLog).Seconds() if coverageEnabled { - interestingTotalCount := int64(c.warmupInputCount-len(c.opts.Seed)) + c.interestingCount - fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec), new interesting: %d (total: %d)\n", c.elapsed(), c.count, rate, c.interestingCount, interestingTotalCount) + total := c.warmupInputCount + c.interestingCount + fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec), new interesting: %d (total: %d)\n", c.elapsed(), c.count, rate, c.interestingCount, total) } else { fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec)\n", c.elapsed(), c.count, rate) }