diff --git a/tools/bigquery/bigquery.go b/tools/bigquery/bigquery.go index 7e6c42b7e..21ffb71bf 100644 --- a/tools/bigquery/bigquery.go +++ b/tools/bigquery/bigquery.go @@ -330,6 +330,9 @@ func NewSuite(name string, official bool) *Suite { // SendBenchmarks sends the slice of benchmarks to the BigQuery dataset/table. func SendBenchmarks(ctx context.Context, suite *Suite, projectID, datasetID, tableID string, opts []option.ClientOption) error { + if len(suite.Benchmarks) == 0 { + return nil // Nothing to upload. + } client, err := bq.NewClient(ctx, projectID, opts...) if err != nil { return fmt.Errorf("failed to initialize client on project: %s: %v", projectID, err)