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

@@ -35,6 +35,9 @@ var runCmd = &cobra.Command{
if !requestsLogOff {
runner.SetRequestsLogOn()
}
if httpStatOn {
runner.SetHTTPStatOn()
}
if pluginLogOn {
runner.SetPluginLogOn()
}
@@ -51,6 +54,7 @@ var runCmd = &cobra.Command{
var (
continueOnFailure bool
requestsLogOff bool
httpStatOn bool
pluginLogOn bool
proxyUrl string
saveTests bool
@@ -61,6 +65,7 @@ func init() {
rootCmd.AddCommand(runCmd)
runCmd.Flags().BoolVarP(&continueOnFailure, "continue-on-failure", "c", false, "continue running next step when failure occurs")
runCmd.Flags().BoolVar(&requestsLogOff, "log-requests-off", false, "turn off request & response details logging")
runCmd.Flags().BoolVar(&httpStatOn, "http-stat", false, "turn on HTTP latency stat (DNSLookup, TCP Connection, etc.)")
runCmd.Flags().BoolVar(&pluginLogOn, "log-plugin", false, "turn on plugin logging")
runCmd.Flags().StringVarP(&proxyUrl, "proxy-url", "p", "", "set proxy url")
runCmd.Flags().BoolVarP(&saveTests, "save-tests", "s", false, "save tests summary")