Skip to content

Commit

Permalink
Last hour only needs 60 points...
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk committed Dec 3, 2017
1 parent a7c0062 commit e95fc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Repositories/Metric/MetricRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function listPointsLastHour(Metric $metric)
{
$dateTime = $this->dates->make();
$pointKey = $dateTime->format('H:i');
$points = $this->repository->getPointsSinceMinutes($metric, 60)->pluck('value', 'key');
$points = $this->repository->getPointsSinceMinutes($metric, 60)->pluck('value', 'key')->take(60);

for ($i = 0; $i <= 60; $i++) {
if (!$points->has($pointKey)) {
Expand Down

0 comments on commit e95fc79

Please sign in to comment.