class HAR::Timings

Overview

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

Included Modules

Defined in:

har/timings.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]

Instance Method Detail

def 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.


[View source]
def 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.


[View source]
def comment : String | Nil #

A comment provided by the user or the application.


[View source]
def comment=(comment : String | Nil) #

A comment provided by the user or the application.


[View source]
def connect : Float64 | Nil #

Time required to create TCP connection.

NOTE Use -1 if the timing does not apply to the current request.


[View source]
def connect=(connect : Float64 | Nil) #

Time required to create TCP connection.

NOTE Use -1 if the timing does not apply to the current request.


[View source]
def 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.


[View source]
def 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.


[View source]
def receive : Float64 | Nil #

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


[View source]
def receive=(receive : Float64 | Nil) #

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


[View source]
def send : Float64 | Nil #

Time required to send HTTP request to the server.


[View source]
def send=(send : Float64 | Nil) #

Time required to send HTTP request to the server.


[View source]
def 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.


[View source]
def 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.


[View source]
def wait : Float64 | Nil #

Waiting for a response from the server.


[View source]
def wait=(wait : Float64 | Nil) #

Waiting for a response from the server.


[View source]