| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class PerformanceMonitor |
||
| 13 | { |
||
| 14 | private float $startTime; |
||
| 15 | private float $endTime; |
||
| 16 | private float $peakMemoryUsage; |
||
| 17 | |||
| 18 | 1 | public function start(): void |
|
| 19 | { |
||
| 20 | 1 | $this->startTime = microtime(true); |
|
| 21 | } |
||
| 22 | |||
| 23 | 1 | public function stop(): void |
|
| 24 | { |
||
| 25 | 1 | $this->endTime = microtime(true); |
|
| 26 | 1 | $this->peakMemoryUsage = memory_get_peak_usage(true); |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | private function getExecutionTime(): float |
|
| 30 | { |
||
| 31 | 1 | return round(($this->endTime - $this->startTime) * 1000, 2); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | private function getPeakMemoryUsage(): float |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function getPerformanceMetrics(): PerformanceMetricsDTO |
|
| 44 | 1 | ); |
|
| 45 | } |
||
| 46 | } |
||
| 47 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths