Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Nov 3, 2023
1 parent 89a61eb commit 358f2fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/supertokens/webserver/RequestStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private RequestStats() {

private void checkAndUpdateMinute(long currentSecond) {
if (currentSecond / 60 == currentMinute) {
return; // no need to do anything
return; // stats update not required
}

int sum = 0;
Expand All @@ -75,7 +75,7 @@ private void checkAndUpdateMinute(long currentSecond) {
averageRequestsPerSecond[(int) (currentMinute % MAX_MINUTES)] = sum / 60.0;
peakRequestsPerSecond[(int) (currentMinute % MAX_MINUTES)] = max;

// Fill zeros for passed minutes
// fill zeros for passed minutes
for (long i = currentMinute + 1; i < currentSecond / 60; i++) {
averageRequestsPerSecond[(int) (i % MAX_MINUTES)] = 0;
peakRequestsPerSecond[(int) (i % MAX_MINUTES)] = 0;
Expand Down

0 comments on commit 358f2fb

Please sign in to comment.