diff --git a/internal/engine/experiment.go b/internal/engine/experiment.go index 025077f..27eb22b 100644 --- a/internal/engine/experiment.go +++ b/internal/engine/experiment.go @@ -128,6 +128,7 @@ func (eaw *experimentAsyncWrapper) RunAsync( defer close(out) // signal the reader we're done! out <- &model.ExperimentAsyncTestKeys{ Extensions: measurement.Extensions, + Input: measurement.Input, MeasurementRuntime: stop.Sub(start).Seconds(), TestKeys: measurement.TestKeys, } @@ -177,6 +178,7 @@ func (e *Experiment) MeasureAsync( for tk := range in { measurement := e.newMeasurement(input) measurement.Extensions = tk.Extensions + measurement.Input = tk.Input measurement.MeasurementRuntime = tk.MeasurementRuntime measurement.TestKeys = tk.TestKeys if err := measurement.Scrub(e.session.ProbeIP()); err != nil { diff --git a/internal/engine/experiment/webstepsx/measurer.go b/internal/engine/experiment/webstepsx/measurer.go index e5d4ad1..491f2d7 100644 --- a/internal/engine/experiment/webstepsx/measurer.go +++ b/internal/engine/experiment/webstepsx/measurer.go @@ -133,8 +133,6 @@ func (mx *Measurer) runAsync(ctx context.Context, sess model.ExperimentSession, ctx, URL, measurex.NewHTTPRequestHeaderForMeasuring(), cookies) for m := range in { out <- &model.ExperimentAsyncTestKeys{ - MeasurementRuntime: m.TotalRuntime.Seconds(), - TestKeys: &TestKeys{URLMeasurement: m}, Extensions: map[string]int64{ archival.ExtHTTP.Name: archival.ExtHTTP.V, archival.ExtDNS.Name: archival.ExtDNS.V, @@ -142,6 +140,9 @@ func (mx *Measurer) runAsync(ctx context.Context, sess model.ExperimentSession, archival.ExtTCPConnect.Name: archival.ExtTCPConnect.V, archival.ExtTLSHandshake.Name: archival.ExtTLSHandshake.V, }, + Input: model.MeasurementTarget(m.URL), + MeasurementRuntime: m.TotalRuntime.Seconds(), + TestKeys: &TestKeys{URLMeasurement: m}, } } } diff --git a/internal/engine/model/experiment.go b/internal/engine/model/experiment.go index dcaeece..49e9e7f 100644 --- a/internal/engine/model/experiment.go +++ b/internal/engine/model/experiment.go @@ -24,14 +24,17 @@ type ExperimentSession interface { // ExperimentAsyncTestKeys is the type of test keys returned by an experiment // when running in async fashion rather than in sync fashion. type ExperimentAsyncTestKeys struct { + // Extensions contains the extensions used by this experiment. + Extensions map[string]int64 + + // Input is the input this measurement refers to. + Input MeasurementTarget + // MeasurementRuntime is the total measurement runtime. MeasurementRuntime float64 // TestKeys contains the actual test keys. TestKeys interface{} - - // Extensions contains the extensions used by this experiment. - Extensions map[string]int64 } // ExperimentMeasurerAsync is a measurer that can run in async fashion.