Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTimelineStats ¶
type HTTPTimelineStats struct {
DNSLookup time.Duration `json:"dnsLookup,omitempty"`
TCPConnection time.Duration `json:"tcpConnection,omitempty"`
TLSHandshake time.Duration `json:"tlsHandshake,omitempty"`
ServerProcessing time.Duration `json:"serverProcessing,omitempty"`
ContentTransfer time.Duration `json:"contentTransfer,omitempty"`
Total time.Duration `json:"total,omitempty"`
}
HTTPTimelineStats http timeline stats
type HTTPTrace ¶
type HTTPTrace struct {
// 因为timeout的设置有可能导致 trace 读写并存,因此需要锁
sync.RWMutex
Host string `json:"host,omitempty"`
Addrs []string `json:"addrs,omitempty"`
Network string `json:"network,omitempty"`
Addr string `json:"addr,omitempty"`
Reused bool `json:"reused,omitempty"`
TCPReused bool `json:"tcpReused,omitempty"`
WasIdle bool `json:"wasIdle,omitempty"`
IdleTime time.Duration `json:"idleTime,omitempty"`
Protocol string `json:"protocol,omitempty"`
TLSVersion string `json:"tlsVersion,omitempty"`
TLSResume bool `json:"tlsResume,omitempty"`
TLSCipherSuite string `json:"tlsCipherSuite,omitempty"`
Certificates []tlsCertificate `json:"certificates,omitempty"`
Start time.Time `json:"start,omitempty"`
DNSStart time.Time `json:"dnsStart,omitempty"`
DNSDone time.Time `json:"dnsDone,omitempty"`
ConnectStart time.Time `json:"connectStart,omitempty"`
ConnectDone time.Time `json:"connectDone,omitempty"`
GotConnect time.Time `json:"gotConnect,omitempty"`
GotFirstResponseByte time.Time `json:"gotFirstResponseByte,omitempty"`
TLSHandshakeStart time.Time `json:"tlsHandshakeStart,omitempty"`
TLSHandshakeDone time.Time `json:"tlsHandshakeDone,omitempty"`
Done time.Time `json:"done,omitempty"`
}
HTTPTrace http trace
func NewClientTrace ¶
func NewClientTrace() (trace *httptrace.ClientTrace, ht *HTTPTrace)
NewClientTrace http client trace
func (*HTTPTrace) Stats ¶
func (ht *HTTPTrace) Stats() (stats *HTTPTimelineStats)
Stats get the stats of time line
Click to show internal directories.
Click to hide internal directories.