class

HAR::Timings

Inherits JSON::Serializable < Reference < Object

This object describes various phases within request-response round trip. All times are specified in milliseconds.

The send, wait and receive timings are not optional and must have non-negative values.

An exporting tool can omit the blocked, dns, connect and ssl, timings on every request if it is unable to provide them. Tools that can provide these timings can set their values to -1 if they don’t apply. For example, connect would be -1 for requests which re-use an existing connection.

The time value for the request must be equal to the sum of the timings supplied in this section (excluding any -1 values).

Following must be true in case there are no -1 values (entry is an object in log.entries):

entry.time == entry.timings.blocked + entry.timings.dns +
              entry.timings.connect + entry.timings.send + entry.timings.wait +
              entry.timings.receive

Constructors

new(blocked : Float64 | Nil = nil, dns : Float64 | Nil = nil, connect : Float64 | Nil = nil, send : Float64 | Nil = nil, wait : Float64 | Nil = nil, receive : Float64 | Nil = nil, ssl : Float64 | Nil = nil, comment : Nil | String = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

blocked

Time spent in a queue waiting for a network connection. NOTE: Use -1 if the timing does not apply to the current request.

Source
blocked=(blocked : Float64 | Nil)

Time spent in a queue waiting for a network connection. NOTE: Use -1 if the timing does not apply to the current request.

Source
comment

A comment provided by the user or the application.

Source
comment=(comment : String | Nil)

A comment provided by the user or the application.

Source
connect

Time required to create TCP connection. NOTE: Use -1 if the timing does not apply to the current request.

Source
connect=(connect : Float64 | Nil)

Time required to create TCP connection. NOTE: Use -1 if the timing does not apply to the current request.

Source
dns

DNS resolution time. The time required to resolve a host name. NOTE: Use -1 if the timing does not apply to the current request.

Source
dns=(dns : Float64 | Nil)

DNS resolution time. The time required to resolve a host name. NOTE: Use -1 if the timing does not apply to the current request.

Source
receive

Time required to read entire response from the server (or cache).

Source
receive=(receive : Float64 | Nil)

Time required to read entire response from the server (or cache).

Source
send

Time required to send HTTP request to the server.

Source
send=(send : Float64 | Nil)

Time required to send HTTP request to the server.

Source
ssl

Time required for SSL/TLS negotiation. If this field is defined then the time is also included in the connect field (to ensure backward compatibility with HAR 1.1). NOTE: Use -1 if the timing does not apply to the current request.

Source
ssl=(ssl : Float64 | Nil)

Time required for SSL/TLS negotiation. If this field is defined then the time is also included in the connect field (to ensure backward compatibility with HAR 1.1). NOTE: Use -1 if the timing does not apply to the current request.

Source
wait

Waiting for a response from the server.

Source
wait=(wait : Float64 | Nil)

Waiting for a response from the server.

Source