mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-16 03:49:52 +00:00
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:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user