refactor: distributed load testing

This commit is contained in:
徐聪
2022-07-25 21:24:08 +08:00
parent b121282525
commit 848d72fe3a
40 changed files with 1958 additions and 1280 deletions
+7 -7
View File
@@ -63,13 +63,6 @@ func writeJSON(w http.ResponseWriter, body []byte, status int) {
writeResponse(w, status, jsonContentType, body)
}
type StartRequestBody struct {
boomer.Profile `mapstructure:",squash"`
Worker string `json:"worker,omitempty" yaml:"worker,omitempty" mapstructure:"worker"` // all
TestCasePath string `json:"testcase-path" yaml:"testcase-path" mapstructure:"testcase-path"`
Other map[string]interface{} `mapstructure:",remain"`
}
type ServerCode int
// server response code
@@ -119,6 +112,13 @@ func CustomAPIResponse(errCode ServerCode, errMsg string) ServerStatus {
}
}
type StartRequestBody struct {
boomer.Profile `mapstructure:",squash"`
Worker string `json:"worker,omitempty" yaml:"worker,omitempty" mapstructure:"worker"` // all
TestCasePath string `json:"testcase-path" yaml:"testcase-path" mapstructure:"testcase-path"`
Other map[string]interface{} `mapstructure:",remain"`
}
type RebalanceRequestBody struct {
boomer.Profile `mapstructure:",squash"`
Worker string `json:"worker,omitempty" yaml:"worker,omitempty" mapstructure:"worker"`