feat: support multi-machine collaborative distributed load testing #1193

This commit is contained in:
xucong053
2022-07-25 21:14:58 +08:00
committed by 徐聪
parent a368a7646d
commit 19c6b0821f
29 changed files with 3354 additions and 171 deletions
+6 -6
View File
@@ -118,15 +118,15 @@ func (o *ConsoleOutput) OnEvent(data map[string]interface{}) {
var state string
switch output.State {
case stateInit:
case StateInit:
state = "initializing"
case stateSpawning:
case StateSpawning:
state = "spawning"
case stateRunning:
case StateRunning:
state = "running"
case stateQuitting:
case StateQuitting:
state = "quitting"
case stateStopped:
case StateStopped:
state = "stopped"
}
@@ -525,7 +525,7 @@ func (o *PrometheusPusherOutput) OnStart() {
// OnStop of PrometheusPusherOutput has nothing to do.
func (o *PrometheusPusherOutput) OnStop() {
// update runner state: stopped
gaugeState.Set(float64(stateStopped))
gaugeState.Set(float64(StateStopped))
if err := o.pusher.Push(); err != nil {
log.Error().Err(err).Msg("push to Pushgateway failed")
}