fix: support log debug level for load testing

This commit is contained in:
debugtalk
2022-06-23 11:22:32 +08:00
parent 1b2a747cff
commit 54799cdc3a

View File

@@ -2,6 +2,7 @@ package cmd
import (
"os"
"strings"
"time"
"github.com/rs/zerolog/log"
@@ -23,7 +24,10 @@ var boomCmd = &cobra.Command{
Args: cobra.MinimumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
boomer.SetUlimit(10240) // ulimit -n 10240
setLogLevel("WARN") // disable info logs for load testing
if !strings.EqualFold(logLevel, "DEBUG") {
logLevel = "WARN" // disable info logs for load testing
}
setLogLevel(logLevel)
},
Run: func(cmd *cobra.Command, args []string) {
var paths []hrp.ITestCase