mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: inaccurate to report stats for total, feat: add average response time in total.
This commit is contained in:
@@ -148,7 +148,7 @@ func (s *requestStats) collectReportData() map[string]interface{} {
|
||||
"failed": s.transactionFailed,
|
||||
}
|
||||
data["stats"] = s.serializeStats()
|
||||
data["stats_total"] = s.total.getStrippedReport()
|
||||
data["stats_total"] = s.total.getReport()
|
||||
data["errors"] = s.serializeErrors()
|
||||
s.errors = make(map[string]*statsError)
|
||||
return data
|
||||
@@ -294,6 +294,11 @@ func (s *statsEntry) getStrippedReport() map[string]interface{} {
|
||||
return report
|
||||
}
|
||||
|
||||
func (s *statsEntry) getReport() map[string]interface{} {
|
||||
report := s.serialize()
|
||||
return report
|
||||
}
|
||||
|
||||
type statsError struct {
|
||||
name string
|
||||
method string
|
||||
|
||||
Reference in New Issue
Block a user