Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • Section
  • Stopwatch
  • StopwatchEvent
  • StopwatchPeriod
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Stopwatch

Stopwatch provides a way to profile code.

Namespace: Symfony\Component\Stopwatch
Author: Fabien Potencier <fabien@symfony.com>
Located at stopwatch/Symfony/Component/Stopwatch/Stopwatch.php
Methods summary
public
# __construct( )
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

LogicException
When the section to re-open is not reachable
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

LogicException
When there's no started section to be stopped

See

Symfony\Component\Stopwatch\Stopwatch::getSectionEvents()
public Symfony\Component\Stopwatch\StopwatchEvent
# start( string $name, string $category = null )

Starts an event.

Starts an event.

Parameters

$name
string
$name The event name
$category
string
$category The event category

Returns

Symfony\Component\Stopwatch\StopwatchEvent
A StopwatchEvent instance
public Symfony\Component\Stopwatch\StopwatchEvent
# stop( string $name )

Stops an event.

Stops an event.

Parameters

$name
string
$name The event name

Returns

Symfony\Component\Stopwatch\StopwatchEvent
A StopwatchEvent instance
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

Symfony\Component\Stopwatch\StopwatchEvent
A StopwatchEvent instance
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

Symfony\Component\Stopwatch\StopwatchEvent[]
An array of StopwatchEvent instances
php-coveralls API documentation generated by ApiGen 2.8.0