Show data usage in summary of measurements

This commit is contained in:
Arturo Filastò 2018-09-12 15:41:54 +02:00
parent 2b1fb662fb
commit b1ae8bc13e
2 changed files with 3 additions and 2 deletions

View File

@ -34,11 +34,11 @@ func init() {
TotalRuntime: 0,
}
for _, msmt := range measurements {
// We assume that since these are summary level information the first
// item will contain the information necessary.
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 {
msmtSummary.DataUsageUp = msmt.DataUsageUp
msmtSummary.DataUsageDown = msmt.DataUsageDown

View File

@ -34,6 +34,7 @@ func ListMeasurements(sess sqlbuilder.Database, resultID int64) ([]MeasurementUR
db.Raw("networks.*"),
db.Raw("urls.*"),
db.Raw("measurements.*"),
db.Raw("results.*"),
).From("results").
Join("measurements").On("results.id = measurements.result_id").
Join("networks").On("results.network_id = networks.id").