Skip to content

Commit

Permalink
pd-tso-bench: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang committed Apr 2, 2017
1 parent 1f12571 commit a68cefe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/pd-tso-bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ func showStats(ctx context.Context, durCh chan time.Duration) {
}

const (
twoMS = time.Millisecond * 2
fiveMS = time.Millisecond * 5
tenMS = time.Millisecond * 10
thirtyMS = time.Millisecond * 30
twoDur = time.Millisecond * 2
fiveDur = time.Millisecond * 5
tenDur = time.Millisecond * 10
thirtyDur = time.Millisecond * 30
)

type stats struct {
Expand Down Expand Up @@ -139,22 +139,22 @@ func (s *stats) update(dur time.Duration) {
s.minDur = dur
}

if dur > thirtyMS {
if dur > thirtyDur {
s.thirtyCnt++
return
}

if dur > tenMS {
if dur > tenDur {
s.tenMSCnt++
return
}

if dur > fiveMS {
if dur > fiveDur {
s.fiveMilliCnt++
return
}

if dur > twoMS {
if dur > twoDur {
s.twoMilliCnt++
return
}
Expand Down

0 comments on commit a68cefe

Please sign in to comment.