Expose the median_bitrate in the list view

This commit is contained in:
Arturo Filastò 2018-09-11 18:41:15 +02:00
commit 2081c25b73
4 changed files with 48 additions and 16 deletions

View file

@ -96,6 +96,14 @@ type Result struct {
MeasurementDir string `db:"measurement_dir"`
}
// PerformanceTestKeys is the result summary for a performance test
type PerformanceTestKeys struct {
Upload float64 `json:"upload"`
Download float64 `json:"download"`
Ping float64 `json:"ping"`
Bitrate float64 `json:"median_bitrate"`
}
// Finished marks the result as done and sets the runtime
func (r *Result) Finished(sess sqlbuilder.Database) error {
if r.IsDone == true || r.Runtime != 0 {