Skip to content

Commit

Permalink
[hotfix][runtime] Minor clean-up in ThreasholdMeter.
Browse files Browse the repository at this point in the history
  • Loading branch information
xintongsong committed Apr 19, 2021
1 parent 5fbf0d7 commit 8df651d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ public long getCount() {
}

public void checkAgainstThreshold() throws ThresholdExceedException {
if (getEventCountsRecentInterval() >= maxEventsPerInterval) {
int recentEvents = getEventCountsRecentInterval();
if (recentEvents >= maxEventsPerInterval) {
throw new ThresholdExceedException(
String.format(
"%d events detected in the recent interval, reaching the threshold %f.",
getEventCountsRecentInterval(), maxEventsPerInterval));
recentEvents, maxEventsPerInterval));
}
}

Expand Down

0 comments on commit 8df651d

Please sign in to comment.