Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { URL string DNSLookup time.Duration TCPConnection time.Duration ServerProcessing time.Duration ContentTransfer time.Duration Total time.Duration }
Result will hold results of request tracing
type Trace ¶
type Trace struct { URL string Created time.Time RequestStart time.Time DNSStartTime time.Time DNSDoneTime time.Time GotConnTime time.Time GotFirstResponseByteTime time.Time BodyReadTime time.Time }
Trace will hold time of trace events of request lifecycle
func DoRequestWithTrace ¶
DoRequestWithTrace is helper to make a request with trace
func (*Trace) ConnectStart ¶
ConnectStart will be used in httptrace.ClientTrace ConnectStart
func (*Trace) DNSDone ¶
func (t *Trace) DNSDone(_ httptrace.DNSDoneInfo)
DNSDone will be used in httptrace.ClientTrace DNSDone
func (*Trace) DNSStart ¶
func (t *Trace) DNSStart(_ httptrace.DNSStartInfo)
DNSStart will be used in httptrace.ClientTrace DNSStart
func (*Trace) GetResult ¶
GetResult will return Result struct with easy to use fields with measurements
func (*Trace) GotConn ¶
func (t *Trace) GotConn(info httptrace.GotConnInfo)
GotConn will be used in httptrace.ClientTrace GotConn
func (*Trace) GotFirstResponseByte ¶
func (t *Trace) GotFirstResponseByte()
GotFirstResponseByte will be used in httptrace.ClientTrace GotFirstResponseByte
Click to show internal directories.
Click to hide internal directories.