Rounded memory value, saw a screenshot with it blowing up (hadn't seen on my systems).

This commit is contained in:
Andrey Savchenko committed 2019-01-02 23:22:31 +02:00
1 parent 950031bbaf
commit d724958dec
1 file changed
+1 -1
+1 -1
View File
@@ -43,7 +43,7 @@ class Stopwatch_Record implements Record_Interface {
public function get_description(): string { public function get_description(): string {
$duration = round( $this->stopwatch_event->getDuration() ); $duration = round( $this->stopwatch_event->getDuration() );
$memory = $this->stopwatch_event->getMemory() / 1024 / 1024; $memory = round( $this->stopwatch_event->getMemory() / 1024 / 1024, 2 );
$description = '' !== $this->description ? "<hr />{$this->description}" : ''; $description = '' !== $this->description ? "<hr />{$this->description}" : '';
return "{$this->name} – {$duration} ms – {$memory} MB{$description}"; return "{$this->name} – {$duration} ms – {$memory} MB{$description}";