From 6640d2f4a039e1123147bf882fdd620ae1fe7bc0 Mon Sep 17 00:00:00 2001 From: Stephen Nancekivell Date: Mon, 11 Apr 2022 17:14:10 +1000 Subject: [PATCH] feat: loadtest support app profile. --- bigtable/cmd/loadtest/loadtest.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bigtable/cmd/loadtest/loadtest.go b/bigtable/cmd/loadtest/loadtest.go index d05aac13239b..d4b4bff13ceb 100644 --- a/bigtable/cmd/loadtest/loadtest.go +++ b/bigtable/cmd/loadtest/loadtest.go @@ -45,8 +45,9 @@ var ( scratchTable = flag.String("scratch_table", "loadtest-scratch", "name of table to use; should not already exist") csvOutput = flag.String("csv_output", "", "output path for statistics in .csv format. If this file already exists it will be overwritten.") - poolSize = flag.Int("pool_size", 1, "size of the gRPC connection pool to use for the data client") - reqCount = flag.Int("req_count", 100, "number of concurrent requests") + poolSize = flag.Int("pool_size", 1, "size of the gRPC connection pool to use for the data client") + reqCount = flag.Int("req_count", 100, "number of concurrent requests") + appProfile = flag.String("app_profile", "", "The application profile to use.") config *cbtconfig.Config client *bigtable.Client @@ -94,7 +95,13 @@ func main() { } log.Printf("Dialing connections...") - client, err = bigtable.NewClient(context.Background(), config.Project, config.Instance, options...) + client, err = bigtable.NewClientWithConfig( + context.Background(), + config.Project, + config.Instance, + bigtable.ClientConfig{AppProfile: *appProfile}, + options..., + ) if err != nil { log.Fatalf("Making bigtable.Client: %v", err) }