Merge pull request #6123 from xiang90/fix_limiter

tools/functional-tester: fix limiter
This commit is contained in:
Xiang Li
2016-08-07 16:20:17 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -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.")

View File

@@ -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)