@@ -87,8 +87,8 @@ |
||
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | $this->stats[$cat]['count']++; |
| 90 | - $this->stats[$cat]['duration'] += (float)$timing['duration'] * 1000; |
|
| 91 | - $this->stats[$cat]['memory'] += (int)$timing['memoryDiff']; |
|
| 90 | + $this->stats[$cat]['duration'] += (float) $timing['duration'] * 1000; |
|
| 91 | + $this->stats[$cat]['memory'] += (int) $timing['memoryDiff']; |
|
| 92 | 92 | } |
| 93 | 93 | if ($final) { |
| 94 | 94 | $this->export(); |
@@ -125,16 +125,16 @@ |
||
| 125 | 125 | $sample = new DataSample([ |
| 126 | 126 | 'requestId' => Webperf::$requestUuid, |
| 127 | 127 | 'url' =>DataSample::PLACEHOLDER_URL, |
| 128 | - 'craftTotalMs' => (int)($stats['database']['duration'] |
|
| 128 | + 'craftTotalMs' => (int) ($stats['database']['duration'] |
|
| 129 | 129 | + $stats['twig']['duration'] |
| 130 | 130 | + $stats['other']['duration']), |
| 131 | - 'craftDbMs' => (int)$stats['database']['duration'], |
|
| 132 | - 'craftDbCnt' => (int)$stats['database']['count'], |
|
| 133 | - 'craftTwigMs' => (int)$stats['twig']['duration'], |
|
| 134 | - 'craftTwigCnt' => (int)$stats['twig']['count'], |
|
| 135 | - 'craftOtherMs' => (int)$stats['other']['duration'], |
|
| 136 | - 'craftOtherCnt' => (int)$stats['other']['count'], |
|
| 137 | - 'craftTotalMemory' => (int)($stats['database']['memory'] |
|
| 131 | + 'craftDbMs' => (int) $stats['database']['duration'], |
|
| 132 | + 'craftDbCnt' => (int) $stats['database']['count'], |
|
| 133 | + 'craftTwigMs' => (int) $stats['twig']['duration'], |
|
| 134 | + 'craftTwigCnt' => (int) $stats['twig']['count'], |
|
| 135 | + 'craftOtherMs' => (int) $stats['other']['duration'], |
|
| 136 | + 'craftOtherCnt' => (int) $stats['other']['count'], |
|
| 137 | + 'craftTotalMemory' => (int) ($stats['database']['memory'] |
|
| 138 | 138 | + $stats['twig']['memory'] |
| 139 | 139 | + $stats['other']['memory']), |
| 140 | 140 | ]); |