• Russ Cox's avatar
    cmd/test2json: emit Benchmark name output early · 9044f018
    Russ Cox authored
    When benchmarks run, they print lines like:
    
      BenchmarkGenericNoMatch-8   3000000 385 ns/op
    
    The first field, padded by spaces and followed by a tab,
    is printed when the benchmark begins running.
    The rest of the line is printed when the benchmark ends.
    Tools and people can watch the timing of these prints
    to see which benchmark is running.
    
    To allow tools consuming json output to continue to be
    able to see which benchmark is running, this CL adds a
    special case to the usual "line at a time" behavior to flush
    the benchmark name if it is observed separately from the
    rest of the line.
    
    Fixes #23352.
    
    Change-Id: I7b6410698d78034eec18745d7f57b7d8e9575dbb
    Reviewed-on: https://go-review.googlesource.com/86695
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    9044f018
Name
Last commit
Last update
..
ascii.json Loading commit data...
ascii.test Loading commit data...
bench.json Loading commit data...
bench.test Loading commit data...
benchfail.json Loading commit data...
benchfail.test Loading commit data...
benchshort.json Loading commit data...
benchshort.test Loading commit data...
issue23036.json Loading commit data...
issue23036.test Loading commit data...
smiley.json Loading commit data...
smiley.test Loading commit data...
unicode.json Loading commit data...
unicode.test Loading commit data...
vet.json Loading commit data...
vet.test Loading commit data...