| 1 | <?php |
||
| 20 | class Benchmarker extends Component implements BenchmarkerInterface, SingletonInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @invisible |
||
| 24 | * |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private $benchmarks = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | * |
||
| 32 | * @throws BenchmarkException |
||
| 33 | */ |
||
| 34 | 2 | public function benchmark($caller, $record, string $context = '') |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Retrieve all active and finished benchmark records. |
||
| 57 | * |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | 1 | public function getBenchmarks(): array |
|
| 64 | } |
||
| 65 |