mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcd-tester: increase default qps, fix cleanup
This commit is contained in:
parent
c0cc161ba8
commit
8e59fb749c
@ -32,7 +32,7 @@ func main() {
|
||||
stressKeySize := flag.Int("stress-key-size", 100, "the size of each key written into etcd.")
|
||||
stressKeySuffixRange := flag.Int("stress-key-count", 250000, "the count of key range written into etcd.")
|
||||
limit := flag.Int("limit", -1, "the limit of rounds to run failure set (-1 to run without limits).")
|
||||
stressQPS := flag.Int("stress-qps", 5000, "maximum number of stresser requests per second.")
|
||||
stressQPS := flag.Int("stress-qps", 10000, "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.")
|
||||
|
@ -149,15 +149,14 @@ func (tt *tester) checkConsistency() (failed bool, err error) {
|
||||
var (
|
||||
revs map[string]int64
|
||||
hashes map[string]int64
|
||||
rerr error
|
||||
ok bool
|
||||
)
|
||||
for i := 0; i < 7; i++ {
|
||||
time.Sleep(time.Second)
|
||||
|
||||
revs, hashes, rerr = tt.cluster.getRevisionHash()
|
||||
if rerr != nil {
|
||||
plog.Printf("%s #%d failed to get current revisions (%v)", tt.logPrefix(), i, rerr)
|
||||
revs, hashes, err = tt.cluster.getRevisionHash()
|
||||
if err != nil {
|
||||
plog.Printf("%s #%d failed to get current revisions (%v)", tt.logPrefix(), i, err)
|
||||
continue
|
||||
}
|
||||
if tt.currentRevision, ok = getSameValue(revs); ok {
|
||||
@ -168,10 +167,9 @@ func (tt *tester) checkConsistency() (failed bool, err error) {
|
||||
}
|
||||
plog.Printf("%s updated current revisions with %d", tt.logPrefix(), tt.currentRevision)
|
||||
|
||||
if !ok || rerr != nil {
|
||||
if !ok || err != nil {
|
||||
plog.Printf("%s checking current revisions failed [revisions: %v]", tt.logPrefix(), revs)
|
||||
failed = true
|
||||
err = tt.cleanup()
|
||||
return
|
||||
}
|
||||
plog.Printf("%s all members are consistent with current revisions [revisions: %v]", tt.logPrefix(), revs)
|
||||
@ -180,7 +178,6 @@ func (tt *tester) checkConsistency() (failed bool, err error) {
|
||||
if _, ok = getSameValue(hashes); !ok {
|
||||
plog.Printf("%s checking current storage hashes failed [hashes: %v]", tt.logPrefix(), hashes)
|
||||
failed = true
|
||||
err = tt.cleanup()
|
||||
return
|
||||
}
|
||||
plog.Printf("%s all members are consistent with storage hashes", tt.logPrefix())
|
||||
|
Loading…
x
Reference in New Issue
Block a user