PHP Interface Zumba\Swivel\MetricsInterface

Mostra file Open project: zumba/swivel

Public Methods

Method Description
count ( string $context, string $source, integer $value = 1, string $metric = '' ) Send a count.
decrement ( string $context, string $source, string $metric = '' ) Decrement a metric by 1.
endMemoryProfile ( string $context, string $source, string $metric = '' ) End the memory profiling and send the value.
endTiming ( string $context, string $source, string $metric = '' ) End the timing for a metric and send the value.
gauge ( string $context, string $source, integer $value, string $metric = '' ) Send a gauged metric.
increment ( string $context, string $source, string $metric = '' ) Increment the metric by 1.
memory ( string $context, string $source, integer | null $memory = null, string $metric = '' ) Report memory usage.
set ( string $context, string $source, integer $value, string $metric = '' ) Send a unique metric.
setNamespace ( string $namespace = self::DEFAULT_NAMESPACE ) Set the slug namespace.
startMemoryProfile ( string $context, string $source, string $metric = '' ) Start memory "profiling".
startTiming ( string $context, string $source, string $metric = '' ) Starts timing a metric.
time ( string $context, string $source, Closure $func, string $metric = '' ) : mixed Execute, measure execution time, and return a \Closure's return value.
timing ( string $context, string $source, integer $value, string $metric = '' ) Send a timing metric.

Method Details

count() public method

Send a count.
public count ( string $context, string $source, integer $value = 1, string $metric = '' )
$context string
$source string
$value integer
$metric string

decrement() public method

Decrement a metric by 1.
public decrement ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

endMemoryProfile() public method

End the memory profiling and send the value.
public endMemoryProfile ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

endTiming() public method

End the timing for a metric and send the value.
public endTiming ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

gauge() public method

Send a gauged metric.
public gauge ( string $context, string $source, integer $value, string $metric = '' )
$context string
$source string
$value integer
$metric string

increment() public method

Increment the metric by 1.
public increment ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

memory() public method

If $memory is null, report peak usage
public memory ( string $context, string $source, integer | null $memory = null, string $metric = '' )
$context string
$source string
$memory integer | null
$metric string

set() public method

Send a unique metric.
public set ( string $context, string $source, integer $value, string $metric = '' )
$context string
$source string
$value integer
$metric string

setNamespace() public method

Set the slug namespace.
public setNamespace ( string $namespace = self::DEFAULT_NAMESPACE )
$namespace string

startMemoryProfile() public method

Start memory "profiling".
public startMemoryProfile ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

startTiming() public method

Starts timing a metric.
public startTiming ( string $context, string $source, string $metric = '' )
$context string
$source string
$metric string

time() public method

Execute, measure execution time, and return a \Closure's return value.
public time ( string $context, string $source, Closure $func, string $metric = '' ) : mixed
$context string
$source string
$func Closure
$metric string
return mixed

timing() public method

Send a timing metric.
public timing ( string $context, string $source, integer $value, string $metric = '' )
$context string
$source string
$value integer
$metric string