appiusattaprobus / server-timing
Add Server-Timing header information from your apps
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/appiusattaprobus/server-timing
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-12-06 00:35:57 UTC
README
Add Server-Timing header information from your apps.
Installation
You can install the package via composer:
composer require appiusattaprobus/server-timing
Usage
use Appiusattaprobus\ServerTiming\StopWatch;
Whole block
StopWatch::start('Task 1'); sleep(1); // do something StopWatch::stop('Task 1'); // Not necessary. At set headers all timers stop StopWatch::setTimingHeader();
Closure
$closureTimer = StopWatch::measureFunc('Closure', function () { usleep(500000); });
By parts
StopWatch::start('Part'); sleep(1); StopWatch::pause('Part'); sleep(3); StopWatch::resume('Part'); sleep(1); StopWatch::stop('Part');
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
