]> Cypherpunks.ru repositories - gostls13.git/commit
testing: add B.ReportMetric for custom benchmark metrics
authorAustin Clements <austin@google.com>
Mon, 11 Mar 2019 14:27:11 +0000 (10:27 -0400)
committerAustin Clements <austin@google.com>
Tue, 19 Mar 2019 16:01:31 +0000 (16:01 +0000)
commit834d229eb6cec7d5b2c4b645985921266e645cb1
treea365881036603d7a424331d24106b791edd294e5
parent349e7df2c3d0f9b5429e7c86121499c137faac7e
testing: add B.ReportMetric for custom benchmark metrics

This adds a ReportMetric method to testing.B that lets the user report
custom benchmark metrics and override built-in metrics.

Fixes #26037.

Change-Id: I8236fbde3683fc27bbe45cbbedfd377b435edf64
Reviewed-on: https://go-review.googlesource.com/c/go/+/166717
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/testing/benchmark.go
src/testing/benchmark_test.go
src/testing/export_test.go