]> Cypherpunks repositories - gostls13.git/commitdiff
internal/fuzz: change meaning of "total" in output
authorKatie Hockman <katie@golang.org>
Fri, 4 Feb 2022 22:02:49 +0000 (17:02 -0500)
committerKatie Hockman <katie@golang.org>
Fri, 4 Feb 2022 22:34:05 +0000 (22:34 +0000)
Fixes #51023

Change-Id: I7dd9f7c696e15ba9c6c887d4c4e0f4d281a82b17
Reviewed-on: https://go-review.googlesource.com/c/go/+/383414
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/internal/fuzz/fuzz.go

index 0014cde04fb86e1f03bd22174d78625e8adb24ad..3ccf74745f67a161f6f2b4090197ca5eec98093e 100644 (file)
@@ -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)
                }