gi-soup-3.0.2: Libsoup bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Soup.Structs.MessageMetrics

Description

Contains metrics collected while loading a [classmessage] either from the network or the disk cache.

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

Synopsis

Exported types

newtype MessageMetrics Source #

Memory-managed wrapper type.

Constructors

MessageMetrics (ManagedPtr MessageMetrics) 

Instances

Instances details
Eq MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

GBoxed MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

ManagedPtrNewtype MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

TypedObject MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

Methods

glibType :: IO GType

HasParentTypes MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

IsGValue (Maybe MessageMetrics) Source #

Convert MessageMetrics to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Soup.Structs.MessageMetrics

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe MessageMetrics -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe MessageMetrics)

type ParentTypes MessageMetrics Source # 
Instance details

Defined in GI.Soup.Structs.MessageMetrics

type ParentTypes MessageMetrics = '[] :: [Type]

Methods

copy

messageMetricsCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m MessageMetrics

Returns: a copy of metrics

Copies metrics.

free

messageMetricsFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m () 

Frees metrics.

getConnectEnd

messageMetricsGetConnectEnd Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the connection end time

Get the time immediately after the [classmessage] 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).

getConnectStart

messageMetricsGetConnectStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the connection start time

Get the time immediately before the [classmessage] 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).

getDnsEnd

messageMetricsGetDnsEnd Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the domain lookup end time

Get the time immediately after the [classmessage] 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).

getDnsStart

messageMetricsGetDnsStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the domain lookup start time

Get the time immediately before the [classmessage] 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).

getFetchStart

messageMetricsGetFetchStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the fetch start time

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

getRequestBodyBytesSent

messageMetricsGetRequestBodyBytesSent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the request body bytes sent

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 [methodmessageMetrics.get_request_body_size]. This value is available right before signalmessage[wroteBody] signal is emitted, but you might get an intermediate value if called before.

getRequestBodySize

messageMetricsGetRequestBodySize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the request body size

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 signalmessage[wroteBody] signal is emitted, but you might get an intermediate value if called before.

getRequestHeaderBytesSent

messageMetricsGetRequestHeaderBytesSent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the request headers bytes sent

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

This value is available right before signalmessage[wroteHeaders] signal is emitted, but you might get an intermediate value if called before.

getRequestStart

messageMetricsGetRequestStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the request start time

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

getResponseBodyBytesReceived

messageMetricsGetResponseBodyBytesReceived Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the response body bytes received

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

This value is available right before signalmessage[gotBody] 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.

getResponseBodySize

messageMetricsGetResponseBodySize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the response body size

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 [methodmessageMetrics.get_response_body_bytes_received]. This value is available right before signalmessage[gotBody] signal is emitted, but you might get an intermediate value if called before.

getResponseEnd

messageMetricsGetResponseEnd Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the response end time

Get the time immediately after the [classmessage] 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.

getResponseHeaderBytesReceived

messageMetricsGetResponseHeaderBytesReceived Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the response headers bytes received

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

This value is available right before signalmessage[gotHeaders] 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.

getResponseStart

messageMetricsGetResponseStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the response start time

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

getTlsStart

messageMetricsGetTlsStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> MessageMetrics

metrics: a MessageMetrics

-> m Word64

Returns: the tls start time

Get the time immediately before the [classmessage] 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).