From 8192cccda61d84f6caaf0a37ee3ba41cb6c4826c Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Tue, 20 Apr 2021 13:09:36 -0700 Subject: Clean test tags. PiperOrigin-RevId: 369505182 --- tools/bigquery/BUILD | 1 + tools/bigquery/bigquery.go | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'tools/bigquery') diff --git a/tools/bigquery/BUILD b/tools/bigquery/BUILD index 1cea9e1c9..81994f954 100644 --- a/tools/bigquery/BUILD +++ b/tools/bigquery/BUILD @@ -12,5 +12,6 @@ go_library( deps = [ "@com_google_cloud_go_bigquery//:go_default_library", "@org_golang_google_api//option:go_default_library", + "@org_golang_x_oauth2//:go_default_library", ], ) diff --git a/tools/bigquery/bigquery.go b/tools/bigquery/bigquery.go index a4ca93ec2..935154acc 100644 --- a/tools/bigquery/bigquery.go +++ b/tools/bigquery/bigquery.go @@ -119,6 +119,14 @@ func NewBenchmark(name string, iters int) *Benchmark { } } +// NewBenchmarkWithMetric creates a new sending to BigQuery, initialized with a +// single iteration and single metric. +func NewBenchmarkWithMetric(name, metric, unit string, value float64) *Benchmark { + b := NewBenchmark(name, 1) + b.AddMetric(metric, unit, value) + return b +} + // NewSuite initializes a new Suite. func NewSuite(name string, official bool) *Suite { return &Suite{ -- cgit v1.2.3