MessageMetrics

class MessageMetrics(pointer: <Error class: unknown class><<Error class: unknown class>>)

Contains metrics collected while loading a class@Message either from the network or the disk cache.

Metrics are not collected by default for a class@Message, you need to add the flag %SOUP_MESSAGE_COLLECT_METRICS to enable the feature.

Temporal metrics are expressed as a monotonic time and always start with a fetch start event and finish with response end. All other events are optional. An event can be 0 because it hasn't happened yet, because it's optional or because the load failed before the event reached.

Size metrics are expressed in bytes and are updated while the class@Message is being loaded. You can connect to different class@Message signals to get the final result of every value.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val soupMessageMetricsPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Copies @metrics.

Link copied to clipboard
fun free()

Frees @metrics.

Link copied to clipboard
fun getConnectEnd(): <Error class: unknown class>

Get the time immediately after the class@Message completed the connection to the server. This includes the time for the proxy negotiation and TLS handshake.

Link copied to clipboard
fun getConnectStart(): <Error class: unknown class>

Get the time immediately before the class@Message started to establish the connection to the server.

Link copied to clipboard
fun getDnsEnd(): <Error class: unknown class>

Get the time immediately after the class@Message completed the domain lookup name for the resource.

Link copied to clipboard
fun getDnsStart(): <Error class: unknown class>

Get the time immediately before the class@Message started the domain lookup name for the resource.

Link copied to clipboard
fun getFetchStart(): <Error class: unknown class>

Get the time immediately before the class@Message started to fetch a resource either from a remote server or local disk cache.

Link copied to clipboard
fun getRequestBodyBytesSent(): <Error class: unknown class>

Get the number of bytes sent to the network for the request body.

Link copied to clipboard
fun getRequestBodySize(): <Error class: unknown class>

Get the request body size in bytes. This is the size of the original body given to the request before any encoding is applied.

Link copied to clipboard
fun getRequestHeaderBytesSent(): <Error class: unknown class>

Get the number of bytes sent to the network for the request headers.

Link copied to clipboard
fun getRequestStart(): <Error class: unknown class>

Get the time immediately before the class@Message started the request of the resource from the server or the local disk cache.

Link copied to clipboard
fun getResponseBodyBytesReceived(): <Error class: unknown class>

Get the number of bytes received from the network for the response body.

Link copied to clipboard
fun getResponseBodySize(): <Error class: unknown class>

Get the response body size in bytes.

Link copied to clipboard
fun getResponseEnd(): <Error class: unknown class>

Get the time immediately after the class@Message received the last bytes of the response from the server or the local disk cache.

Link copied to clipboard
fun getResponseHeaderBytesReceived(): <Error class: unknown class>

Get the number of bytes received from the network for the response headers.

Link copied to clipboard
fun getResponseStart(): <Error class: unknown class>

Get the time immediately after the class@Message received the first bytes of the response from the server or the local disk cache.

Link copied to clipboard
fun getTlsStart(): <Error class: unknown class>

Get the time immediately before the class@Message started the TLS handshake.