You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
pecintaseni e8d1bc620d adding Composer 1 year ago
..
CHANGELOG.md adding Composer 1 year ago
LICENSE adding Composer 1 year ago
README.md adding Composer 1 year ago
Section.php adding Composer 1 year ago
Stopwatch.php adding Composer 1 year ago
StopwatchEvent.php adding Composer 1 year ago
StopwatchPeriod.php adding Composer 1 year ago
composer.json adding Composer 1 year ago

README.md

Stopwatch Component

The Stopwatch component provides a way to profile code.

Getting Started

$ composer require symfony/stopwatch
use Symfony\Component\Stopwatch\Stopwatch;

$stopwatch = new Stopwatch();

// optionally group events into sections (e.g. phases of the execution)
$stopwatch->openSection();

// starts event named 'eventName'
$stopwatch->start('eventName');

// ... run your code here

// optionally, start a new "lap" time
$stopwatch->lap('foo');

// ... run your code here

$event = $stopwatch->stop('eventName');

$stopwatch->stopSection('phase_1');

Resources