mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6123 from xiang90/fix_limiter
tools/functional-tester: fix limiter
This commit is contained in:
@@ -33,7 +33,7 @@ func main() {
|
||||
stressKeySuffixRange := flag.Uint("stress-key-count", 250000, "the count of key range written into etcd.")
|
||||
stressKeyRangeLimit := flag.Uint("stress-range-limit", 50, "maximum number of keys to range or delete.")
|
||||
limit := flag.Int("limit", -1, "the limit of rounds to run failure set (-1 to run without limits).")
|
||||
stressQPS := flag.Int("stress-qps", 10000, "maximum number of stresser requests per second.")
|
||||
stressQPS := flag.Int("stress-qps", 3000, "maximum number of stresser requests per second.")
|
||||
schedCases := flag.String("schedule-cases", "", "test case schedule")
|
||||
consistencyCheck := flag.Bool("consistency-check", true, "true to check consistency (revision, hash)")
|
||||
isV2Only := flag.Bool("v2-only", false, "'true' to run V2 only tester.")
|
||||
|
||||
@@ -180,7 +180,7 @@ func (s *stresser) Stress() error {
|
||||
s.conn = conn
|
||||
s.cancel = cancel
|
||||
s.wg = wg
|
||||
s.rateLimiter = rate.NewLimiter(rate.Every(time.Second), s.qps)
|
||||
s.rateLimiter = rate.NewLimiter(rate.Limit(s.qps), s.qps)
|
||||
s.mu.Unlock()
|
||||
|
||||
kvc := pb.NewKVClient(conn)
|
||||
|
||||
Reference in New Issue
Block a user