feat: stat HTTP request latencies (DNSLookup, TCP Connection and so on)

This commit is contained in:
debugtalk
2022-05-03 23:37:23 +08:00
parent 7c052770e5
commit 5bdbcdc2e5
14 changed files with 223 additions and 16 deletions

View File

@@ -54,6 +54,7 @@ func NewRunner(t *testing.T) *HRPRunner {
type HRPRunner struct {
t *testing.T
failfast bool
httpStatOn bool
requestsLogOn bool
pluginLogOn bool
saveTests bool
@@ -100,6 +101,13 @@ func (r *HRPRunner) SetRequestsLogOn() *HRPRunner {
return r
}
// SetHTTPStatOn turns on HTTP latency stat.
func (r *HRPRunner) SetHTTPStatOn() *HRPRunner {
log.Info().Msg("[init] SetHTTPStatOn")
r.httpStatOn = true
return r
}
// SetPluginLogOn turns on plugin logging.
func (r *HRPRunner) SetPluginLogOn() *HRPRunner {
log.Info().Msg("[init] SetPluginLogOn")