feat: specify running cycles for load testing.

This commit is contained in:
徐聪
2022-01-12 14:48:43 +08:00
parent b58dbaa9db
commit f765921233
4 changed files with 83 additions and 8 deletions

View File

@@ -29,6 +29,9 @@ var boomCmd = &cobra.Command{
}
hrpBoomer := hrp.NewBoomer(spawnCount, spawnRate)
hrpBoomer.SetRateLimiter(maxRPS, requestIncreaseRate)
if loopCount > 0 {
hrpBoomer.SetLoopCount(loopCount)
}
if !disableConsoleOutput {
hrpBoomer.AddOutput(boomer.NewConsoleOutput())
}
@@ -45,6 +48,7 @@ var (
spawnCount int
spawnRate float64
maxRPS int64
loopCount int64
requestIncreaseRate string
memoryProfile string
memoryProfileDuration time.Duration