Skip to content

Commit

Permalink
Small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jhalterman committed Apr 23, 2023
1 parent e55f3ce commit 91307d4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -37,8 +37,8 @@ class TimedCircuitStats implements CircuitStats {
public TimedCircuitStats(int bucketCount, Duration thresholdingPeriod, Clock clock, CircuitStats oldStats) {
this.clock = clock;
this.buckets = new Bucket[bucketCount];
windowSizeMillis = thresholdingPeriod.toMillis();
bucketSizeMillis = thresholdingPeriod.toMillis() / buckets.length;
windowSizeMillis = bucketSizeMillis * buckets.length;
for (int i = 0; i < buckets.length; i++)
buckets[i] = new Bucket();
this.summary = new Stat();
Expand Down

0 comments on commit 91307d4

Please sign in to comment.