feat: support rendezvous after spawn done

Change-Id: I4b07a88b61da4dc1863b189db9eb831ffb14130a
This commit is contained in:
buyuxiang
2022-01-25 14:25:14 +08:00
parent 5394d9bdf8
commit a5e57c9a65
8 changed files with 475 additions and 11 deletions

View File

@@ -127,3 +127,11 @@ func (b *Boomer) RecordFailure(requestType, name string, responseTime int64, exc
func (b *Boomer) Quit() {
b.localRunner.stop()
}
func (b *Boomer) IsSpawnDone() bool {
return b.localRunner.isSpawnDone
}
func (b *Boomer) GetSpawnCount() int {
return b.localRunner.spawnCount
}

View File

@@ -63,6 +63,7 @@ type runner struct {
spawnCount int // target clients to spawn
spawnRate float64
loop *Loop // specify running cycles
isSpawnDone bool
outputs []Output
}
@@ -193,6 +194,7 @@ func (r *localRunner) spawnWorkers(spawnCount int, spawnRate float64, quit chan
}
}
r.isSpawnDone = true
if spawnCompleteFunc != nil {
spawnCompleteFunc()
}