don't propagate PID in endpoints2Processes

The 'create' function passed to addChild is only ever invoked when we
cannot find a matching process in the process topology. In these cases
the host and pid will be _all_ the info we are ever going to have,
both of which are incorporated in the id. Node summarisation renders
that as best it can; adding the PID as metadata does not make a
difference but for a line with that info in the detail panel, which
adds nothing since the PID is already included in the label.
This commit is contained in:
Matthias Radestock
2017-12-28 02:24:54 +00:00
parent 27c2f3a5d2
commit d7e90303a6

View File

@@ -92,7 +92,7 @@ func (e endpoints2Processes) Render(rpt report.Report) Nodes {
ret.addChild(n, id, newPseudoNode)
}
} else {
pid, timestamp, ok := n.Latest.LookupEntry(process.PID)
pid, ok := n.Latest.Lookup(process.PID)
if !ok {
continue
}
@@ -105,8 +105,7 @@ func (e endpoints2Processes) Render(rpt report.Report) Nodes {
ret.addChild(n, id, func(id string) report.Node {
// we have a pid, but no matching process node;
// create a new one rather than dropping the data
return report.MakeNode(id).WithTopology(report.Process).
WithLatest(process.PID, timestamp, pid)
return report.MakeNode(id).WithTopology(report.Process)
})
}
}