Class Stopwatch
Stopwatch provides a way to profile code.
Methods summary
public
|
|
public
|
#
openSection( string|null $id = null )
Creates a new section or re-opens an existing section.
Creates a new section or re-opens an existing section.
Parameters
- $id
string|null $id The id of the session to re-open, null to create a new one
Throws
|
public
|
#
stopSection( string $id )
Stops the last started section.
Stops the last started section.
The id parameter is used to retrieve the events from this section.
Parameters
- $id
string $id The identifier of the section
Throws
See
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
start( string $name, string $category = null )
Starts an event.
Parameters
- $name
string $name The event name
- $category
string $category The event category
Returns
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
stop( string $name )
Stops an event.
Parameters
- $name
string $name The event name
Returns
|
public
Symfony\Component\Stopwatch\StopwatchEvent
|
#
lap( string $name )
Stops then restarts an event.
Stops then restarts an event.
Parameters
- $name
string $name The event name
Returns
|
public
Symfony\Component\Stopwatch\StopwatchEvent[]
|
#
getSectionEvents( string $id )
Gets all events for a given section.
Gets all events for a given section.
Parameters
- $id
string $id A section identifier
Returns
|