Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | 16 | public function __invoke(array $record) |
|
15 | { |
||
16 | 16 | $usage = memory_get_usage(false); |
|
17 | 16 | $usageReal = memory_get_usage(true); |
|
18 | |||
19 | 16 | $peak = memory_get_peak_usage(false); |
|
20 | 16 | $peakReal = memory_get_peak_usage(true); |
|
21 | |||
22 | 16 | $record['extra']['memory_usage'] = $this->formatBytes($usage); |
|
23 | 16 | $record['extra']['memory_usage_real'] = $this->formatBytes($usageReal); |
|
24 | 16 | $record['extra']['memory_peak_usage'] = $this->formatBytes($peak); |
|
25 | 16 | $record['extra']['memory_peak_usage_real'] = $this->formatBytes($peakReal); |
|
26 | |||
27 | 16 | return $record; |
|
28 | } |
||
29 | } |
||
30 |