mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
remove redundant operation
We were setting the very same k/v that we just looked up.
This commit is contained in:
@@ -45,7 +45,7 @@ func (r processWithContainerNameRenderer) Render(rpt report.Report) Nodes {
|
||||
outputs := make(report.Nodes, len(processes.Nodes))
|
||||
for id, p := range processes.Nodes {
|
||||
outputs[id] = p
|
||||
containerID, timestamp, ok := p.Latest.LookupEntry(docker.ContainerID)
|
||||
containerID, ok := p.Latest.Lookup(docker.ContainerID)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
@@ -53,7 +53,6 @@ func (r processWithContainerNameRenderer) Render(rpt report.Report) Nodes {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
p.Latest = p.Latest.Set(docker.ContainerID, timestamp, containerID)
|
||||
if containerName, timestamp, ok := container.Latest.LookupEntry(docker.ContainerName); ok {
|
||||
p.Latest = p.Latest.Set(docker.ContainerName, timestamp, containerName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user