Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Utils\Timing Class Reference

A helper class to make it easier to compute timing metrics. More...

Public Member Functions

 end (?string $name=null)
 End this timing measurement, reporting it under the given name.
 

Static Public Member Functions

static millis ()
 Return the current number of milliseconds since the epoch, as a float.
 
static start (?object $metrics=null)
 Start a timing measurement, logging it to the given $metrics object (which just needs to have a timing() method).
 

Detailed Description

A helper class to make it easier to compute timing metrics.

Member Function Documentation

◆ end()

Wikimedia\Parsoid\Utils\Timing::end ( ?string $name = null)

End this timing measurement, reporting it under the given name.

Parameters
?string$name
Returns
float Number of milliseconds reported

◆ start()

static Wikimedia\Parsoid\Utils\Timing::start ( ?object $metrics = null)
static

Start a timing measurement, logging it to the given $metrics object (which just needs to have a timing() method).

Parameters
?object$metrics
Returns
Timing

The documentation for this class was generated from the following file: