Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling errors in English words: respone ==> response #382

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions debug/debug_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ import (
)

type TraceInfo struct {
DnsDuration time.Duration
ConnDuration time.Duration
TLSDuration time.Duration
RequestDuration time.Duration
WaitResponeDuration time.Duration
ResponseDuration time.Duration
TotalDuration time.Duration
w io.Writer
DnsDuration time.Duration
ConnDuration time.Duration
TLSDuration time.Duration
RequestDuration time.Duration
WaitResponseDuration time.Duration
ResponseDuration time.Duration
TotalDuration time.Duration
w io.Writer
}

func (t *TraceInfo) StartTrace(opt *Options, needTrace bool, req *http.Request, do middler.Do) (*http.Response, error) {
w := opt.Write
var dnsStart, connStart, reqStart, tlsStart, waitResponseStart, respStart time.Time
var dnsDuration, connDuration, reqDuration, tlsDuration, waitResponeDuration time.Duration
var dnsDuration, connDuration, reqDuration, tlsDuration, waitResponseDuration time.Duration
var startNow time.Time

if needTrace {
Expand Down Expand Up @@ -68,7 +68,7 @@ func (t *TraceInfo) StartTrace(opt *Options, needTrace bool, req *http.Request,
},

GotFirstResponseByte: func() {
waitResponeDuration = time.Since(waitResponseStart)
waitResponseDuration = time.Since(waitResponseStart)
respStart = time.Now()
},
}
Expand All @@ -83,7 +83,7 @@ func (t *TraceInfo) StartTrace(opt *Options, needTrace bool, req *http.Request,
t.ConnDuration = connDuration
t.TLSDuration = tlsDuration
t.RequestDuration = reqDuration
t.WaitResponeDuration = waitResponeDuration
t.WaitResponseDuration = waitResponseDuration
t.ResponseDuration = time.Since(respStart)
t.TotalDuration = time.Since(startNow)
t.w = w
Expand Down
Loading