3.5 <SoupMessageMetrics>

Structure: <SoupMessageMetrics>

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

Metrics are not collected by default for a Message, you need to add the flag 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 Message is being loaded. You can connect to different Message signals to get the final result of every value.

Procedures

Method: message-metrics:copy self ⇒ %return
Method: copy self ⇒ %return

Copies self.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: a <SoupMessageMetrics>.

a copy of self

Method: message-metrics:free self
Method: free self

Frees self.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

Method: message-metrics:get-connect-end self ⇒ %return
Method: get-connect-end self ⇒ %return

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

It will be 0 if no network connection was required to fetch the resource (a persistent connection was used or resource was loaded from the local disk cache).

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the connection end time

Method: message-metrics:get-connect-start self ⇒ %return
Method: get-connect-start self ⇒ %return

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

It will be 0 if no network connection was required to fetch the resource (a persistent connection was used or resource was loaded from the local disk cache).

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the connection start time

Method: message-metrics:get-dns-end self ⇒ %return
Method: get-dns-end self ⇒ %return

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

It will be 0 if no domain lookup was required to fetch the resource (a persistent connection was used or resource was loaded from the local disk cache).

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the domain lookup end time

Method: message-metrics:get-dns-start self ⇒ %return
Method: get-dns-start self ⇒ %return

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

It will be 0 if no domain lookup was required to fetch the resource (a persistent connection was used or resource was loaded from the local disk cache).

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the domain lookup start time

Method: message-metrics:get-fetch-start self ⇒ %return
Method: get-fetch-start self ⇒ %return

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

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the fetch start time

Method: message-metrics:get-request-body-bytes-sent self ⇒ %return
Method: get-request-body-bytes-sent self ⇒ %return

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

This is the size of the body sent, after encodings are applied, so it might be greater than the value returned by MessageMetrics.get_request_body_size. This value is available right before "wrote-body" signal is emitted, but you might get an intermediate value if called before.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the request body bytes sent

Method: message-metrics:get-request-body-size self ⇒ %return
Method: get-request-body-size self ⇒ %return

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

This value is available right before "wrote-body" signal is emitted, but you might get an intermediate value if called before.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the request body size

Method: message-metrics:get-request-header-bytes-sent self ⇒ %return
Method: get-request-header-bytes-sent self ⇒ %return

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

This value is available right before "wrote-headers" signal is emitted, but you might get an intermediate value if called before.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the request headers bytes sent

Method: message-metrics:get-request-start self ⇒ %return
Method: get-request-start self ⇒ %return

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

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the request start time

Method: message-metrics:get-response-body-bytes-received self ⇒ %return
Method: get-response-body-bytes-received self ⇒ %return

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

This value is available right before "got-body" signal is emitted, but you might get an intermediate value if called before. For resources loaded from the disk cache this value is always 0.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the response body bytes received

Method: message-metrics:get-response-body-size self ⇒ %return
Method: get-response-body-size self ⇒ %return

Get the response body size in bytes.

This is the size of the body as given to the user after all encodings are applied, so it might be greater than the value returned by MessageMetrics.get_response_body_bytes_received. This value is available right before "got-body" signal is emitted, but you might get an intermediate value if called before.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the response body size

Method: message-metrics:get-response-end self ⇒ %return
Method: get-response-end self ⇒ %return

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

In case of load failure, this returns the time immediately before the fetch is aborted.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the response end time

Method: message-metrics:get-response-header-bytes-received self ⇒ %return
Method: get-response-header-bytes-received self ⇒ %return

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

This value is available right before "got-headers" signal is emitted, but you might get an intermediate value if called before. For resources loaded from the disk cache this value is always 0.

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the response headers bytes received

Method: message-metrics:get-response-start self ⇒ %return
Method: get-response-start self ⇒ %return

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

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the response start time

Method: message-metrics:get-tls-start self ⇒ %return
Method: get-tls-start self ⇒ %return

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

It will be 0 if no TLS handshake was required to fetch the resource (connection was not secure, a persistent connection was used or resource was loaded from the local disk cache).

self

Passed: a <SoupMessageMetrics>.

a <SoupMessageMetrics>

%return

Returned: an unsigned 64-bit integer.

the tls start time