HttpMetrics
final class HttpMetrics (View source)
Freezes one completed HTTP interval and its SQL totals without retaining request data.
PHP peak memory is the script's peak reported by PHP, not a request-local peak in a persistent worker. Values are supplied by the lifecycle owner and never re-read.
Methods
Accepts finite, non-negative measurements in milliseconds and bytes.
Returns the completed HTTP interval in milliseconds, without reading the clock again.
Returns the PHP script/process peak in bytes sampled at completion.
Returns the captured SQL attempt count, including failed executions.
Returns the captured SQL milliseconds, excluding connection setup and observer execution.
Details
__construct
__construct(float $durationMs, int $phpPeakMemoryBytes, int $sqlCount, float $sqlMs)
Accepts finite, non-negative measurements in milliseconds and bytes.
durationMs
float
durationMs()
Returns the completed HTTP interval in milliseconds, without reading the clock again.
phpPeakMemoryBytes
int
phpPeakMemoryBytes()
Returns the PHP script/process peak in bytes sampled at completion.
sqlCount
int
sqlCount()
Returns the captured SQL attempt count, including failed executions.
sqlMs
float
sqlMs()
Returns the captured SQL milliseconds, excluding connection setup and observer execution.