Don't report nodes filtered out through the short-lived-connections join

This commit is contained in:
Tom Wilkie
2016-04-07 13:14:57 +01:00
parent 674cb24f2a
commit ca94368420
2 changed files with 13 additions and 1 deletions

View File

@@ -169,6 +169,18 @@ func FilterUnconnected(r Renderer) Renderer {
)
}
// SilentFilterUnconnected produces a renderer that filters unconnected nodes
// from the given renderer; nodes filtered by this are not reported in stats.
func SilentFilterUnconnected(r Renderer) Renderer {
return MakeSilentFilter(
func(node report.Node) bool {
_, ok := node.Latest.Lookup(IsConnected)
return ok
},
ColorConnected(r),
)
}
// FilterNoop does nothing.
func FilterNoop(in Renderer) Renderer {
return in

View File

@@ -84,7 +84,7 @@ var ContainerRenderer = MakeReduce(
// We need to be careful to ensure we only include each edge once. Edges brought in
// by the above renders will have a pid, so its enough to filter out any nodes with
// pids.
FilterUnconnected(MakeMap(
SilentFilterUnconnected(MakeMap(
MapIP2Container,
MakeReduce(
MakeMap(