* @method static \BeyondCode\ServerTiming\ServerTiming addMetric(string $metric) Add new event with null duration.
10
* @method static bool hasStartedEvent(string $key) Check if a event has been created already.
11
* @method static \BeyondCode\ServerTiming\ServerTiming measure(string $key) Stop existing event and record its duration, else start a new event.
12
* @method static \BeyondCode\ServerTiming\ServerTiming stop(string $key) Stop a timed event and record its duration.
13
* @method static void stopAllUnfinishedEvents() Stop all running events.
14
* @method static \BeyondCode\ServerTiming\ServerTiming setDuration(string $key, float|int|callable $duration) Set the duration for an event if $duration is number, else record elapsed time to run a user function if $duration is callable.
15
* @method static float|int|null getDuration(string $key) Retrieve the duration an event has taken.
16
* @method static array events() Get the list of finished events with their associated duration.