Include total_runtime in the summary of measurements
This commit is contained in:
parent
8da12a9c07
commit
d02ed117f9
|
@ -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 {
|
||||
|
|
|
@ -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.*"),
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user