mirror of https://github.com/golang/go.git
internal/trace: actually add experimental data to map
addExperimentalData was missing actually placing the data into the map, leaving ExperimentalEvent.Data always nil. Change-Id: I1715ab11eb7cfcdb982b56be28378521a357ca2d Reviewed-on: https://go-review.googlesource.com/c/go/+/588955 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
44d06616b5
commit
1ed8166192
|
|
@ -162,6 +162,9 @@ func processBatch(g *generation, b batch) error {
|
||||||
}
|
}
|
||||||
g.freq = freq
|
g.freq = freq
|
||||||
case b.exp != event.NoExperiment:
|
case b.exp != event.NoExperiment:
|
||||||
|
if g.expData == nil {
|
||||||
|
g.expData = make(map[event.Experiment]*ExperimentalData)
|
||||||
|
}
|
||||||
if err := addExperimentalData(g.expData, b); err != nil {
|
if err := addExperimentalData(g.expData, b); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -437,6 +440,7 @@ func addExperimentalData(expData map[event.Experiment]*ExperimentalData, b batch
|
||||||
ed, ok := expData[b.exp]
|
ed, ok := expData[b.exp]
|
||||||
if !ok {
|
if !ok {
|
||||||
ed = new(ExperimentalData)
|
ed = new(ExperimentalData)
|
||||||
|
expData[b.exp] = ed
|
||||||
}
|
}
|
||||||
ed.Batches = append(ed.Batches, ExperimentalBatch{
|
ed.Batches = append(ed.Batches, ExperimentalBatch{
|
||||||
Thread: b.m,
|
Thread: b.m,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue