Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTimelineStats ¶
type HTTPTimelineStats struct {
// dns lookup time
DNSLookup time.Duration `json:"dnsLookup,omitempty"`
// get connection time
GetConnection time.Duration `json:"getConnection,omitempty"`
// tcp connection time
TCPConnection time.Duration `json:"tcpConnection,omitempty"`
// tls handshake time
TLSHandshake time.Duration `json:"tlsHandshake,omitempty"`
// server processing time
ServerProcessing time.Duration `json:"serverProcessing,omitempty"`
// content transfer time
ContentTransfer time.Duration `json:"contentTransfer,omitempty"`
// total time
Total time.Duration `json:"total,omitempty"`
}
HTTPTimelineStats http timeline stats
func (*HTTPTimelineStats) String ¶ added in v1.0.3
func (stats *HTTPTimelineStats) String() string
String return http timeline stats's string
type HTTPTrace ¶
type HTTPTrace struct {
// http request host
Host string `json:"host,omitempty"`
// addrs of host
Addrs []string `json:"addrs,omitempty"`
// network type
Network string `json:"network,omitempty"`
// http request addr
Addr string `json:"addr,omitempty"`
// http local addr
LocalAddr string `json:"localAddr,omitempty"`
// tcp reused
Reused bool `json:"reused,omitempty"`
// tcp was idle
WasIdle bool `json:"wasIdle,omitempty"`
// tcp idle time
IdleTime time.Duration `json:"idleTime,omitempty"`
// http protocol
Protocol string `json:"protocol,omitempty"`
// tls version
TLSVersion string `json:"tlsVersion,omitempty"`
// tls resume
TLSResume bool `json:"tlsResume,omitempty"`
// tls cipher suite
TLSCipherSuite string `json:"tlsCipherSuite,omitempty"`
// tls certificate lst
Certificates []tlsCertificate `json:"certificates,omitempty"`
// OCSPStapled OCSP stapling
OCSPStapled bool `json:"ocspStapled,omitempty"`
// DNSCoalesced dns query coalesced
DNSCoalesced bool `json:"dnsCoalesced"`
// start time of request
Start time.Time `json:"start,omitempty"`
// get connection time of request
GetConn time.Time `json:"getConn,omitempty"`
// dns start time
DNSStart time.Time `json:"dnsStart,omitempty"`
// dns done time
DNSDone time.Time `json:"dnsDone,omitempty"`
// connect start time
ConnectStart time.Time `json:"connectStart,omitempty"`
// connect done time
ConnectDone time.Time `json:"connectDone,omitempty"`
// got connect time
GotConnect time.Time `json:"gotConnect,omitempty"`
// wrote headers time
WroteHeaders time.Time `json:"wroteHeaders,omitempty"`
// wrote request
WroteRequest time.Time `json:"wroteRequest,omitempty"`
// got first response byte time
GotFirstResponseByte time.Time `json:"gotFirstResponseByte,omitempty"`
// tls handshake start time
TLSHandshakeStart time.Time `json:"tlsHandshakeStart,omitempty"`
// tls handshake done time
TLSHandshakeDone time.Time `json:"tlsHandshakeDone,omitempty"`
// request done time
Done time.Time `json:"done,omitempty"`
}
HTTPTrace http trace
func NewClientTrace ¶
func NewClientTrace() (trace *httptrace.ClientTrace, ht *HTTPTrace)
NewClientTrace returns a new client trace
func (*HTTPTrace) Stats ¶
func (ht *HTTPTrace) Stats() (stats *HTTPTimelineStats)
Stats returns the stats of time line
Click to show internal directories.
Click to hide internal directories.