diff --git a/tools/pd-api-bench/cases/controller.go b/tools/pd-api-bench/cases/controller.go index 00d9261cba8..d6679cad1d9 100644 --- a/tools/pd-api-bench/cases/controller.go +++ b/tools/pd-api-bench/cases/controller.go @@ -214,7 +214,7 @@ func (c *httpController) run() { qps := c.GetQPS() burst := c.GetBurst() cliNum := int64(len(c.clients)) - tt := time.Duration(base/qps*burst*cliNum) * time.Microsecond + tt := time.Duration(base*burst*cliNum/qps) * time.Microsecond log.Info("begin to run http case", zap.String("case", c.Name()), zap.Int64("qps", qps), zap.Int64("burst", burst), zap.Duration("interval", tt)) for _, hCli := range c.clients { c.wg.Add(1) @@ -283,7 +283,7 @@ func (c *gRPCController) run() { qps := c.GetQPS() burst := c.GetBurst() cliNum := int64(len(c.clients)) - tt := time.Duration(base/qps*burst*cliNum) * time.Microsecond + tt := time.Duration(base*burst*cliNum/qps) * time.Microsecond log.Info("begin to run gRPC case", zap.String("case", c.Name()), zap.Int64("qps", qps), zap.Int64("burst", burst), zap.Duration("interval", tt)) for _, cli := range c.clients { c.wg.Add(1) @@ -352,7 +352,7 @@ func (c *etcdController) run() { qps := c.GetQPS() burst := c.GetBurst() cliNum := int64(len(c.clients)) - tt := time.Duration(base/qps*burst*cliNum) * time.Microsecond + tt := time.Duration(base*burst*cliNum/qps) * time.Microsecond log.Info("begin to run etcd case", zap.String("case", c.Name()), zap.Int64("qps", qps), zap.Int64("burst", burst), zap.Duration("interval", tt)) err := c.Init(c.ctx, c.clients[0]) if err != nil {