Skip to content

Commit

Permalink
fix some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
0XFF-96 committed Aug 5, 2020
1 parent ca7661a commit e1bb9ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,17 +589,17 @@ func (r *Request) TraceInfo() TraceInfo {
ti.TotalTime = ct.endTime.Sub(ct.dnsStart)
}

// Only calcuate on successful connections
// Only calculate on successful connections
if !ct.connectDone.IsZero() {
ti.TCPConnTime = ct.connectDone.Sub(ct.dnsDone)
}

// Only calcuate on successful connections
// Only calculate on successful connections
if !ct.gotConn.IsZero() {
ti.ConnTime = ct.gotConn.Sub(ct.getConn)
}

// Only calcuate on successful connections
// Only calculate on successful connections
if !ct.gotFirstResponseByte.IsZero() {
ti.ResponseTime = ct.endTime.Sub(ct.gotFirstResponseByte)
}
Expand Down
4 changes: 2 additions & 2 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (r *Response) String() string {

// Time method returns the time of HTTP response time that from request we sent and received a request.
//
// See `Response.ReceivedAt` to know when client recevied response and see `Response.Request.Time` to know
// See `Response.ReceivedAt` to know when client received response and see `Response.Request.Time` to know
// when client sent a request.
func (r *Response) Time() time.Duration {
if r.Request.clientTrace != nil {
Expand All @@ -108,7 +108,7 @@ func (r *Response) Time() time.Duration {
return r.receivedAt.Sub(r.Request.Time)
}

// ReceivedAt method returns when response got recevied from server for the request.
// ReceivedAt method returns when response got received from server for the request.
func (r *Response) ReceivedAt() time.Time {
return r.receivedAt
}
Expand Down

0 comments on commit e1bb9ae

Please sign in to comment.