1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Core\Facade; |
4: | |
5: | use Salient\Core\AbstractFacade; |
6: | use Salient\Core\MetricCollector; |
7: | |
8: | /** |
9: | * A facade for MetricCollector |
10: | * |
11: | * @method static int<1,max> count(string $counter, string $group = 'general') Increment a counter and return its value |
12: | * @method static int getCounter(string $counter, string $group = 'general') Get the value of a counter |
13: | * @method static array<string,array<string,int>>|array<string,int> getCounters(string[]|string|null $groups = null) Get counter values (see {@see MetricCollector::getCounters()}) |
14: | * @method static array{float,int} getTimer(string $timer, string $group = 'general', bool $includeRunning = true) Get the start count and elapsed milliseconds of a timer |
15: | * @method static array<string,array<string,array{float,int}>>|array<string,array{float,int}> getTimers(bool $includeRunning = true, string[]|string|null $groups = null) Get timer start counts and elapsed milliseconds (see {@see MetricCollector::getTimers()}) |
16: | * @method static void pop() Pop metrics off the stack |
17: | * @method static void push() Push the current state of all metrics onto the stack |
18: | * @method static void startTimer(string $timer, string $group = 'general') Start a timer based on the system's high-resolution time |
19: | * @method static float stopTimer(string $timer, string $group = 'general') Stop a timer and return the elapsed milliseconds |
20: | * |
21: | * @api |
22: | * |
23: | * @extends AbstractFacade<MetricCollector> |
24: | * |
25: | * @generated |
26: | */ |
27: | final class Profile extends AbstractFacade |
28: | { |
29: | /** |
30: | * @internal |
31: | */ |
32: | protected static function getService() |
33: | { |
34: | return MetricCollector::class; |
35: | } |
36: | } |
37: |