summaryrefslogtreecommitdiff
path: root/traceable
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-05-05 01:59:46 -0400
committerWill Hawkins <[email protected]>2022-05-05 01:59:46 -0400
commit2a9feb82b55481308c0f6aa9d813e9021b0333ef (patch)
treeebe116516ce93446508100ccac64178a20ac3a6f /traceable
parent10ddc4e9c56beeb5718cd878313ddf88695a1948 (diff)
Upgraded RPM Calculation Support (Take 1)
This patch begins the work on updated RPM calculations using the httptrace infrastructure. Because we are still not able to break out the TLS handshake time due to upstream bugs, there are some workarounds in place. However, the numbers appear much more sane.
Diffstat (limited to 'traceable')
-rw-r--r--traceable/traceable.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/traceable/traceable.go b/traceable/traceable.go
index e3f81d5..6efc7f7 100644
--- a/traceable/traceable.go
+++ b/traceable/traceable.go
@@ -17,6 +17,8 @@ type Traceable interface {
SetGotConnTimeInfo(time.Time, httptrace.GotConnInfo)
SetTLSHandshakeStartTime(time.Time)
SetTLSHandshakeDoneTimeState(time.Time, tls.ConnectionState)
+ SetHttpWroteRequestTimeInfo(time.Time, httptrace.WroteRequestInfo)
+ SetHttpResponseReadyTime(time.Time)
}
func GenerateHttpTimingTracer(
@@ -51,6 +53,12 @@ func GenerateHttpTimingTracer(
TLSHandshakeDone: func(tlsConnState tls.ConnectionState, err error) {
traceable.SetTLSHandshakeDoneTimeState(time.Now(), tlsConnState)
},
+ WroteRequest: func(wroteRequest httptrace.WroteRequestInfo) {
+ traceable.SetHttpWroteRequestTimeInfo(time.Now(), wroteRequest)
+ },
+ GotFirstResponseByte: func() {
+ traceable.SetHttpResponseReadyTime(time.Now())
+ },
}
return &tracer
}