diff options
author | Zach Koopmans <zkoopmans@google.com> | 2020-10-09 14:26:55 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-09 14:29:21 -0700 |
commit | b576de907cb42b8df11695cc58792631f4c059ae (patch) | |
tree | 5cb8fe698911b8142a2f09faa6d7fe6cec998f69 /test/benchmarks/tools/iperf.go | |
parent | 6df400dfb61e2219b1d88dd2aa6be7fbb59d3ab6 (diff) |
Add parsers golang benchmarks.
Add parser and formatting for golang benchmarks for docker benchmarks.
Change adds a library for printing and parsing Test parameters and metrics.
Benchmarks use the library to print parameters in the Benchmark title
(e.g. the name field in b.Run()), and to report CustomMetrics. Parser
uses the library to parse printed data from benchmark output and
put it into BigQuery structs.
PiperOrigin-RevId: 336365628
Diffstat (limited to 'test/benchmarks/tools/iperf.go')
-rw-r--r-- | test/benchmarks/tools/iperf.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/benchmarks/tools/iperf.go b/test/benchmarks/tools/iperf.go index df3d9349b..5c4e7125b 100644 --- a/test/benchmarks/tools/iperf.go +++ b/test/benchmarks/tools/iperf.go @@ -42,7 +42,7 @@ func (i *Iperf) Report(b *testing.B, output string) { if err != nil { b.Fatalf("failed to parse bandwitdth from %s: %v", output, err) } - b.ReportMetric(bW*1024, "bandwidth_b/s") // Convert from Kb/s to b/s. + ReportCustomMetric(b, bW*1024, "bandwidth" /*metric name*/, "bytes_per_second" /*unit*/) } // bandwidth parses the Bandwidth number from an iperf report. A sample is below. |