| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class PerformanceMonitor |
||
| 14 | { |
||
| 15 | private float $startTime; |
||
| 16 | private float $endTime; |
||
| 17 | private float $peakMemoryUsage; |
||
| 18 | |||
| 19 | public function start(): void |
||
| 20 | { |
||
| 21 | $this->startTime = microtime(true); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function stop(): void |
||
| 25 | { |
||
| 26 | $this->endTime = microtime(true); |
||
| 27 | $this->peakMemoryUsage = memory_get_peak_usage(true); |
||
| 28 | } |
||
| 29 | |||
| 30 | private function getExecutionTime(): float |
||
| 31 | { |
||
| 32 | return round(($this->endTime - $this->startTime) * 1000, 2); |
||
| 33 | } |
||
| 34 | |||
| 35 | private function getPeakMemoryUsage(): float |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getPerformanceMetrics(): PerformanceMetricsDTO |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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