Register and return times, count and data elements
| package | salt\utils |
|---|
addData(string $name, mixed $value)
stringthe name of the data
mixeddata to append
addTime(string $name, float $time)
stringname of the timer
floattime to add
decrement(string $name, integer $number = 1) : integer
stringname of the counter
integernumber to substract, default 1
integerthe counter valueend(string $name) : float
The timer is destroyed after the call. If we call start() on it again, it will restart to 0
stringname of the timer
floattime of the ended timergetAllCounters() : array<mixed,integer>
array<mixed,integer>all counters : name => intgetAllDatas() : array<mixed,mixed[]>
array<mixed,mixed[]>all datas : name => array (mixed)getAllTimes() : array<mixed,float>
array<mixed,float>all timers at their last stop() : name => floatgetCounter(string $name) : integer
stringname of a counter
integercounter valuegetData(string $name) : NULL | array<mixed,mixed>
stringname of a data to retrieve
NULLarray<mixed,mixed>: NULL if name does not exist. array of registered data otherwise.getTime(string $name) : float
stringname of a timer
floattimer value at the last stophasData(string $name) : boolean
stringname of a data
booleantrue if some data exists for name.increment(string $name, integer $number = 1) : integer
stringname of the counter
integernumber to add, default 1
integerthe counter valueresetCount(string $name)
stringname of the counter
resetTime(string $name)
stringname of the timer
start(string $name)
stringname of the timer
stop(string $name) : float
stringname of the timer
floattime of the stopped timer$counters : array<mixed,integer>
array()$datas : array<mixed,mixed>
array()$inProgress : array<mixed,float>
array()$times : array<mixed,float>
array()