Skip to content

Switch flag definitions to be on pflag instead of flag in package go/cmd/vtbench #11287

Closed
@ajm188

Description

@ajm188

Part of #10697.

Current flags:

$ git grep -E "\bflag\.[A-Z]" -- go/cmd/vtbench/*.go
        host       = flag.String("host", "", "vtgate host(s) in the form 'host1,host2,...'")
        port       = flag.Int("port", 0, "vtgate port")
        unixSocket = flag.String("unix_socket", "", "vtgate unix socket")
        protocol   = flag.String("protocol", "mysql", "client protocol, either mysql (default), grpc-vtgate, or grpc-vttablet")
        user       = flag.String("user", "", "username to connect using mysql (password comes from the db-credentials-file)")
        db         = flag.String("db", "", "db name to use when connecting / running the queries (e.g. @replica, keyspace, keyspace/shard etc)")
        deadline = flag.Duration("deadline", 5*time.Minute, "maximum duration for the test run (default 5 minutes)")
        sql      = flag.String("sql", "", "sql statement to execute")
        threads  = flag.Int("threads", 2, "number of parallel threads to run")
        count    = flag.Int("count", 1000, "number of queries per thread")
        flag.CommandLine.SetOutput(logutil.NewLoggerWriter(logger))
        flag.Lookup("logtostderr").Value.Set("true")

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions