mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Preallocate metrics when copying
This commit is contained in:
@@ -32,7 +32,7 @@ func (m Metrics) Merge(other Metrics) Metrics {
|
||||
|
||||
// Copy returns a value copy of the sets map.
|
||||
func (m Metrics) Copy() Metrics {
|
||||
result := Metrics{}
|
||||
result := make(Metrics, len(m))
|
||||
for k, v := range m {
|
||||
result[k] = v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user