Documentation ¶
Overview ¶
Package httpstat traces HTTP latency infomation (DNSLookup, TCP Connection and so on) on any golang HTTP request. It uses `httptrace` package. Just create `go-httpstat` powered `context.Context` and give it your `http.Request` (no big code modification is required).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Result ¶
type Result struct { // The followings are timeline of request NameLookup time.Duration Connect time.Duration PreTransfer time.Duration StartTransfer time.Duration // contains filtered or unexported fields }
Result stores httpstat info.
| |--NameLookup |--|--Connect |--|--|--APPCONNECT |--|--|--|--PreTransfer |--|--|--|--|--StartTransfer |--|--|--|--|--|--total |--|--|--|--|--|--REDIRECT
func (*Result) End ¶ added in v0.2.0
End sets the time when reading response is done. This must be called after reading response body.
Click to show internal directories.
Click to hide internal directories.