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 add(int $value, string $counter, string $group = 'general') Add a value to a counter and return its value |
12: | * @method static int count(string $counter, string $group = 'general') Increment a counter and return its value |
13: | * @method static int getCounter(string $counter, string $group = 'general') Get the value of a counter |
14: | * @method static array<string,array<string,int>>|array<string,int> getCounters(string[]|string|null $groups = null) Get counter values (see {@see MetricCollector::getCounters()}) |
15: | * @method static array{float,int} getTimer(string $timer, string $group = 'general', bool $includeRunning = true) Get the start count and elapsed milliseconds of a timer |
16: | * @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()}) |
17: | * @method static void pop() Pop metrics off the stack |
18: | * @method static void push() Push the current state of all metrics onto the stack |
19: | * @method static void startTimer(string $timer, string $group = 'general') Start a timer based on the system's high-resolution time |
20: | * @method static float stopTimer(string $timer, string $group = 'general') Stop a timer and return the elapsed milliseconds |
21: | * |
22: | * @api |
23: | * |
24: | * @extends AbstractFacade<MetricCollector> |
25: | * |
26: | * @generated |
27: | */ |
28: | final class Profile extends AbstractFacade |
29: | { |
30: | /** |
31: | * @internal |
32: | */ |
33: | protected static function getService() |
34: | { |
35: | return MetricCollector::class; |
36: | } |
37: | } |
38: |