summaryrefslogtreecommitdiffhomepage
path: root/tools/parsers/go_parser.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-11-05 15:40:54 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-05 15:43:14 -0800
commit7caefd68df06062d2c0a3547132f1d25af49af22 (patch)
tree719475b183383a8f0e3dab9d61947020e5b16aac /tools/parsers/go_parser.go
parentc47f8afe2334c1395a2acd9ebf5191aa4554907c (diff)
Internal Change
PiperOrigin-RevId: 340941898
Diffstat (limited to 'tools/parsers/go_parser.go')
-rw-r--r--tools/parsers/go_parser.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/parsers/go_parser.go b/tools/parsers/go_parser.go
index df4875e6a..57e538149 100644
--- a/tools/parsers/go_parser.go
+++ b/tools/parsers/go_parser.go
@@ -30,10 +30,10 @@ import (
// ParseOutput expects golang benchmark output and returns a struct formatted
// for BigQuery.
func ParseOutput(output string, name string, official bool) (*bigquery.Suite, error) {
- suite := bigquery.NewSuite(name)
+ suite := bigquery.NewSuite(name, official)
lines := strings.Split(output, "\n")
for _, line := range lines {
- bm, err := parseLine(line, official)
+ bm, err := parseLine(line)
if err != nil {
return nil, fmt.Errorf("failed to parse line '%s': %v", line, err)
}
@@ -60,7 +60,7 @@ func ParseOutput(output string, name string, official bool) (*bigquery.Suite, er
// {Name: requests_per_second, Unit: QPS, Sample: 140 }
// }
//}
-func parseLine(line string, official bool) (*bigquery.Benchmark, error) {
+func parseLine(line string) (*bigquery.Benchmark, error) {
fields := strings.Fields(line)
// Check if this line is a Benchmark line. Otherwise ignore the line.
@@ -78,7 +78,7 @@ func parseLine(line string, official bool) (*bigquery.Benchmark, error) {
return nil, fmt.Errorf("parse name/params: %v", err)
}
- bm := bigquery.NewBenchmark(name, iters, official)
+ bm := bigquery.NewBenchmark(name, iters)
for _, p := range params {
bm.AddCondition(p.Name, p.Value)
}