refactor: Run with config

This commit is contained in:
debugtalk
2021-09-22 20:12:33 +08:00
parent 4c2d7673fa
commit 9fb19da2ac
7 changed files with 13 additions and 10 deletions

View File

@@ -33,9 +33,10 @@ func convertBoomerTask(testcase *TestCase) *boomer.Task {
Name: testcase.Config.Name,
Weight: testcase.Config.Weight,
Fn: func() {
config := &testcase.Config
for _, step := range testcase.TestSteps {
start := time.Now()
err := step.Run()
err := step.Run(config)
elapsed := time.Since(start).Nanoseconds() / int64(time.Millisecond)
if err == nil {