metrics
metrics copied to clipboard
Timing documentation seems inconsistent
It looks like the example documentation on how to use the timing functionality isn't consistent with the expected data type and unit of measure:
$start = microtime(true);
$diff = microtime(true) - $start;
$collector->timing('foo.bar', $diff);
In this example, $diff
will be a float
representing the time delta value in microseconds, while the interface expects an int
representing milliseconds:
/**
* Records a timing.
*
* @param string $variable
* @param int $time The duration of the timing in milliseconds
*/
public function timing($variable, $time);
See https://github.com/beberlei/metrics/pull/71