Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <admin@liudos.us>
  • Loading branch information
lhy1024 committed Dec 28, 2021
1 parent 8220e37 commit 3bb2056
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/statistics/hot_peer_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func checkOp(c *C, ret []*HotPeerStat, storeID uint64, actionType ActionType) {
}

// checkIntervalSum checks whether the interval sum of the peers are different.
func checkIntervalSum(cache *hotPeerCache, region *core.RegionInfo, peerCount int) bool {
func checkIntervalSum(cache *hotPeerCache, region *core.RegionInfo) bool {
var intervalSums []int
for _, peer := range region.GetPeers() {
oldItem := cache.getOldHotPeerStat(region.GetID(), peer.StoreId)
Expand All @@ -200,9 +200,6 @@ func checkIntervalSumContinuous(c *C, intervalSums map[uint64]int, rets []*HotPe
new := int(ret.getIntervalSum() / 1000000000)
if ret.source == direct {
if old, ok := intervalSums[ret.StoreID]; ok {
if new != (old+int(interval))%RegionHeartBeatReportInterval {
println(ret.StoreID, old, new, interval)
}
c.Assert(new, Equals, (old+int(interval))%RegionHeartBeatReportInterval)
}
}
Expand Down

0 comments on commit 3bb2056

Please sign in to comment.