mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: support log debug level for load testing
This commit is contained in:
+5
-1
@@ -2,6 +2,7 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
@@ -23,7 +24,10 @@ var boomCmd = &cobra.Command{
|
|||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
boomer.SetUlimit(10240) // ulimit -n 10240
|
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) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
var paths []hrp.ITestCase
|
var paths []hrp.ITestCase
|
||||||
|
|||||||
Reference in New Issue
Block a user