feat: add step start time in step result

This commit is contained in:
lilong.129
2023-06-01 16:12:28 +08:00
parent d5554b38ac
commit f4a9be3c88
2 changed files with 3 additions and 0 deletions

View File

@@ -564,8 +564,10 @@ func (r *SessionRunner) Start(givenVars map[string]interface{}) error {
}
// run step
stepStartTime := time.Now().Unix()
stepResult, err = step.Run(r)
stepResult.Name = stepName + loopIndex
stepResult.Time = stepStartTime
r.updateSummary(stepResult)
}

View File

@@ -16,6 +16,7 @@ const (
type StepResult struct {
Name string `json:"name" yaml:"name"` // step name
Time int64 `json:"time" yaml:"time"` // step time
StepType StepType `json:"step_type" yaml:"step_type"` // step type, testcase/request/transaction/rendezvous
Success bool `json:"success" yaml:"success"` // step execution result
Elapsed int64 `json:"elapsed_ms" yaml:"elapsed_ms"` // step execution time in millisecond(ms)