Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Dec 5, 2023
1 parent 5737651 commit 920ed15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Storage/DatabaseStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected function aggregateCounts(Collection $entries): Collection

foreach ($entries as $entry) {
foreach ($this->periods() as $period) {
// TODO: add back the comment
// Exclude entries that would be trimmed.
if ($entry->timestamp < CarbonImmutable::now()->subMinutes($period)->getTimestamp()) {
continue;
}
Expand Down Expand Up @@ -250,6 +250,7 @@ protected function aggregateMaximums(Collection $entries): Collection

foreach ($entries as $entry) {
foreach ($this->periods() as $period) {
// Exclude entries that would be trimmed.
if ($entry->timestamp < CarbonImmutable::now()->subMinutes($period)->getTimestamp()) {
continue;
}
Expand Down Expand Up @@ -288,6 +289,7 @@ protected function aggregateAverages(Collection $entries): Collection

foreach ($entries as $entry) {
foreach ($this->periods() as $period) {
// Exclude entries that would be trimmed.
if ($entry->timestamp < CarbonImmutable::now()->subMinutes($period)->getTimestamp()) {
continue;
}
Expand Down

0 comments on commit 920ed15

Please sign in to comment.