Benchmark durations were originally formatted with higher precision
because they contained just the NsPerOp field. Now that we're
approximating the total duration they are more accurate and don't need
as many decimals.
The NsPerOp was previously casted to a time.Duration (int64) before
multiplying it with the number of iterations. This has been fixed by
doing the casting after the multiplication. The resulting duration
should be a bit more accurate.
The reportBuilder has been updated to use the ordered output collector
to keep track of go test output. This makes it possible to include
benchmark output in the generated report and makes sure that output is
preserved when deleting subtest parents from the report.
The consequence of this is that any output emitted after the test or
benchmark result, will no longer belong to the last test. Instead it
will be appended to the global log. This is necessary to correctly
attribute output to the correct test or benchmark, for example in cases
where both tests and benchmarks appear.
In the past, Go test output printed test logs after the test result.
However, from Go 1.14 this behaviour was changed and test logs are now
printed before the test result.
With this commit, we effectively no longer support the old behaviour in
Go1.13 and earlier. The output will still appear in the generated
report, however it will no longer belong to the correct test.