mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +02:00
cmd/tools/bench.go: Support Redis username and password flags.
This commit is contained in:
parent
9f61bbd316
commit
1ba1422c6f
1 changed files with 6 additions and 2 deletions
|
|
@ -23,6 +23,8 @@ var benchCmd = &cli.Command{
|
|||
Usage: "Run a benchmark against a thalos node",
|
||||
Flags: []cli.Flag{
|
||||
redisUrlFlag,
|
||||
redisUserFlag,
|
||||
redisPasswordFlag,
|
||||
redisDbFlag,
|
||||
redisPrefixFlag,
|
||||
chainIdFlag,
|
||||
|
|
@ -46,8 +48,10 @@ var benchCmd = &cli.Command{
|
|||
|
||||
// Create redis client
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: ctx.String("redis-url"),
|
||||
DB: ctx.Int("redis-db"),
|
||||
Addr: ctx.String("redis-url"),
|
||||
Username: ctx.String("redis-user"),
|
||||
Password: ctx.String("redis-pw"),
|
||||
DB: ctx.Int("redis-db"),
|
||||
})
|
||||
|
||||
if err := rdb.Ping(context.Background()).Err(); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue