diff --git a/nettests/nettests.go b/nettests/nettests.go index ea06ade..2231546 100644 --- a/nettests/nettests.go +++ b/nettests/nettests.go @@ -76,6 +76,10 @@ func (c *Controller) Run(builder *engine.ExperimentBuilder, inputs []string) err builder.SetCallbacks(model.ExperimentCallbacks(c)) c.numInputs = len(inputs) exp := builder.NewExperiment() + defer func() { + c.res.DataUsageDown += exp.KibiBytesReceived() + c.res.DataUsageUp += exp.KibiBytesSent() + }() c.msmts = make(map[int64]*database.Measurement) @@ -202,6 +206,9 @@ func (c *Controller) OnProgress(perc float64, msg string) { // OnDataUsage should be called when we have a data usage update. func (c *Controller) OnDataUsage(dloadKiB, uploadKiB float64) { - c.res.DataUsageDown += dloadKiB - c.res.DataUsageUp += uploadKiB + // Unused as 2020-04-05: we're now using directly the accessors + // provided by the experiment. This callback is going to be removed + // from probe-engine in May or June. + // + // TODO(bassosimone): create an issue for this? }