Skip to content

Commit

Permalink
Merge pull request #3580 from mrr000/collection-fix
Browse files Browse the repository at this point in the history
Fix Toolbar event collector number formatting
  • Loading branch information
MGatner authored Sep 1, 2020
2 parents 810cc9e + bb280e3 commit 03767da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions system/Debug/Toolbar/Collectors/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,22 @@ public function display(): array
{
$data['events'][$key] = [
'event' => $key,
'duration' => number_format(($row['end'] - $row['start']) * 1000, 2),
'duration' => ($row['end'] - $row['start']) * 1000,
'count' => 1,
];

continue;
}

$data['events'][$key]['duration'] += number_format(($row['end'] - $row['start']) * 1000, 2);
$data['events'][$key]['duration'] += ($row['end'] - $row['start']) * 1000;
$data['events'][$key]['count']++;
}

foreach ($data['events'] as &$row)
{
$row['duration'] = number_format($row['duration'], 2);
}

return $data;
}

Expand Down

0 comments on commit 03767da

Please sign in to comment.