Skip to content

Commit 2c436a5

Browse files
committed
chore: s/houseKeeping/removeExpiredEntries/g
1 parent 203ee70 commit 2c436a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/ThroughputMovingWindow.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ private ThroughputMovingWindow(Duration window) {
3838
}
3939

4040
void add(Instant now, Throughput value) {
41-
houseKeeping(now);
41+
removeExpiredEntries(now);
4242
values.add(new Entry(now, value));
4343
}
4444

4545
Throughput avg(Instant now) {
46-
houseKeeping(now);
46+
removeExpiredEntries(now);
4747
return values.stream()
4848
.map(Entry::getValue)
4949
.reduce(
5050
Throughput.zero(),
5151
(tp1, tp2) -> Throughput.of(tp1.getNumBytes() + tp2.getNumBytes(), window));
5252
}
5353

54-
private void houseKeeping(Instant now) {
54+
private void removeExpiredEntries(Instant now) {
5555
Instant newMin = now.minus(window);
5656
values.removeIf(e -> lteq(e.getAt(), newMin));
5757
}

0 commit comments

Comments
 (0)