mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-20 08:03:15 +00:00
Move Counters into Latest
The only place Counters are used is in rendering, for the number of nodes under a topology, so the overhead of holding a unique data structure in every Node is unwarranted.
This commit is contained in:
@@ -195,7 +195,7 @@ func (ret *joinResults) addUnmappedChild(m report.Node, id string, topology stri
|
||||
}
|
||||
result.Children.UnsafeAdd(m)
|
||||
if m.Topology != report.Endpoint { // optimisation: we never look at endpoint counts
|
||||
result.Counters = result.Counters.Add(m.Topology, 1)
|
||||
result = result.WithCounter(m.Topology, 1)
|
||||
}
|
||||
ret.nodes[id] = result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user