mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-17 06:37:22 +00:00
Move timestamp up from 'Latest' string map to Report level
We never merge multiple string values in a single node from different sources, so it's sufficient to take the value from the latest report.
This commit is contained in:
@@ -81,7 +81,7 @@ func (c *connectionCounters) add(dns report.DNSRecords, outgoing bool, localNode
|
||||
srcEndpoint, dstEndpoint = localEndpoint, remoteEndpoint
|
||||
}
|
||||
connectionID := srcEndpoint.ID
|
||||
if copySrcEndpointID, _, ok := srcEndpoint.Latest.LookupEntry(endpoint.CopyOf); ok {
|
||||
if copySrcEndpointID, ok := srcEndpoint.Latest.Lookup(endpoint.CopyOf); ok {
|
||||
connectionID = copySrcEndpointID
|
||||
}
|
||||
if _, ok := c.counted[connectionID]; ok {
|
||||
@@ -237,7 +237,7 @@ func endpointChildIDsAndCopyMapOf(n report.Node) (report.IDList, map[string]stri
|
||||
n.Children.ForEach(func(child report.Node) {
|
||||
if child.Topology == report.Endpoint {
|
||||
ids = ids.Add(child.ID)
|
||||
if copyID, _, ok := child.Latest.LookupEntry(endpoint.CopyOf); ok {
|
||||
if copyID, ok := child.Latest.Lookup(endpoint.CopyOf); ok {
|
||||
copies[child.ID] = copyID
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func hasMoreThanOneConnection(n report.Node, endpoints report.Nodes) bool {
|
||||
firstRealEndpointID := ""
|
||||
for _, endpointID := range n.Adjacency {
|
||||
if ep, ok := endpoints[endpointID]; ok {
|
||||
if copyID, _, ok := ep.Latest.LookupEntry(report.CopyOf); ok {
|
||||
if copyID, ok := ep.Latest.Lookup(report.CopyOf); ok {
|
||||
endpointID = copyID
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user