params['prefix'] ) ? $this->params['prefix'] : ''; $contextStats = $this->collector->getContext()->getStats(); foreach ( $stats as $stat ) { $key = "{$prefix}.{$stat['name']}"; // Convert fractional seconds to whole milliseconds $cpu = round( $stat['cpu'] * 1000 ); $real = round( $stat['real'] * 1000 ); $contextStats->increment( "{$key}.calls" ); $contextStats->timing( "{$key}.cpu", $cpu ); $contextStats->timing( "{$key}.real", $real ); } } }