diff --git a/internal/cli/list/list.go b/internal/cli/list/list.go index 304da18..371ff90 100644 --- a/internal/cli/list/list.go +++ b/internal/cli/list/list.go @@ -33,8 +33,12 @@ func init() { AnomalyCount: 0, DataUsageUp: 0, DataUsageDown: 0, + TotalRuntime: 0, } for _, msmt := range measurements { + if msmtSummary.TotalRuntime == 0 { + msmtSummary.TotalRuntime = msmt.ResultRuntime + } // FIXME this logic should be adjusted for test groups that have many // measurements in them if msmtSummary.DataUsageUp == 0 { diff --git a/internal/database/actions.go b/internal/database/actions.go index 7b5ff68..ddfa07e 100644 --- a/internal/database/actions.go +++ b/internal/database/actions.go @@ -27,6 +27,7 @@ func ListMeasurements(sess sqlbuilder.Database, resultID int64) ([]MeasurementUR "results.start_time as result_start_time", "results.is_done as result_is_done", "results.runtime as result_runtime", + "results.test_group_name as test_group_name", "urls.id as url_id", db.Raw("networks.*"), db.Raw("urls.*"), diff --git a/internal/output/output.go b/internal/output/output.go index 466b57a..fac6faf 100644 --- a/internal/output/output.go +++ b/internal/output/output.go @@ -21,6 +21,7 @@ func Progress(key string, perc float64, msg string) { } type MeasurementSummaryData struct { + TotalRuntime float64 TotalCount int64 AnomalyCount int64 DataUsageUp int64 @@ -30,6 +31,7 @@ type MeasurementSummaryData struct { func MeasurementSummary(msmt MeasurementSummaryData) { log.WithFields(log.Fields{ "type": "measurement_summary", + "total_runtime": msmt.TotalRuntime, "total_count": msmt.TotalCount, "anomaly_count": msmt.AnomalyCount, "data_usage_down": msmt.DataUsageDown,