mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: disable keep alive
This commit is contained in:
+5
-3
@@ -19,9 +19,6 @@ func NewBoomer(spawnCount int, spawnRate float64) *HRPBoomer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.hrpRunner = NewRunner(nil)
|
b.hrpRunner = NewRunner(nil)
|
||||||
// set client transport for high concurrency load testing
|
|
||||||
b.hrpRunner.SetClientTransport(b.GetSpawnCount(), b.GetDisableKeepAlive(), b.GetDisableCompression())
|
|
||||||
|
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +29,11 @@ type HRPBoomer struct {
|
|||||||
pluginsMutex *sync.RWMutex // avoid data race
|
pluginsMutex *sync.RWMutex // avoid data race
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *HRPBoomer) SetClientTransport() {
|
||||||
|
// set client transport for high concurrency load testing
|
||||||
|
b.hrpRunner.SetClientTransport(b.GetSpawnCount(), b.GetDisableKeepAlive(), b.GetDisableCompression())
|
||||||
|
}
|
||||||
|
|
||||||
// Run starts to run load test for one or multiple testcases.
|
// Run starts to run load test for one or multiple testcases.
|
||||||
func (b *HRPBoomer) Run(testcases ...ITestCase) {
|
func (b *HRPBoomer) Run(testcases ...ITestCase) {
|
||||||
event := sdk.EventTracking{
|
event := sdk.EventTracking{
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ var boomCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
hrpBoomer.SetDisableKeepAlive(disableKeepalive)
|
hrpBoomer.SetDisableKeepAlive(disableKeepalive)
|
||||||
hrpBoomer.SetDisableCompression(disableCompression)
|
hrpBoomer.SetDisableCompression(disableCompression)
|
||||||
|
hrpBoomer.SetClientTransport()
|
||||||
hrpBoomer.EnableCPUProfile(cpuProfile, cpuProfileDuration)
|
hrpBoomer.EnableCPUProfile(cpuProfile, cpuProfileDuration)
|
||||||
hrpBoomer.EnableMemoryProfile(memoryProfile, memoryProfileDuration)
|
hrpBoomer.EnableMemoryProfile(memoryProfile, memoryProfileDuration)
|
||||||
hrpBoomer.EnableGracefulQuit()
|
hrpBoomer.EnableGracefulQuit()
|
||||||
|
|||||||
Reference in New Issue
Block a user