| Total Complexity | 6 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | trait BenchmarkFields |
||
| 15 | { |
||
| 16 | /** @var array */ |
||
| 17 | protected $functions = []; |
||
| 18 | |||
| 19 | /** @var Profiler */ |
||
| 20 | protected $profiler; |
||
| 21 | |||
| 22 | /** @var MemoryUsageReport */ |
||
| 23 | protected $memoryUsageReport; |
||
| 24 | |||
| 25 | /** @var int */ |
||
| 26 | protected $doneIterations = 0; |
||
| 27 | |||
| 28 | /** @var int */ |
||
| 29 | protected $doneIterationsCombined = 0; |
||
| 30 | |||
| 31 | /** @var Timer */ |
||
| 32 | private $timer; |
||
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * @return array |
||
| 37 | */ |
||
| 38 | 5 | public function getFunctions(): array |
|
| 39 | { |
||
| 40 | 5 | return $this->functions; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return Profiler |
||
| 45 | */ |
||
| 46 | 5 | public function getProfiler(): Profiler |
|
| 47 | { |
||
| 48 | 5 | return $this->profiler; |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | 5 | public function getDoneIterations(): int |
|
| 55 | { |
||
| 56 | 5 | return $this->doneIterations; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return Timer |
||
| 61 | */ |
||
| 62 | 5 | public function getTimer(): Timer |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return int |
||
| 69 | */ |
||
| 70 | 5 | public function getDoneIterationsCombined(): int |
|
| 71 | { |
||
| 72 | 5 | return $this->doneIterationsCombined; |
|
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return MemoryUsageReport |
||
| 77 | */ |
||
| 78 | 5 | public function getMemoryUsageReport(): MemoryUsageReport |
|
| 81 | } |
||
| 82 | } |
||
| 83 |