mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
optimise LatestMap.Merge by merging old into young
This commit is contained in:
7
vendor/github.com/weaveworks/ps/map.go
generated
vendored
7
vendor/github.com/weaveworks/ps/map.go
generated
vendored
@@ -42,6 +42,9 @@ type Map interface {
|
||||
// This operation is O(log N) in the number of keys.
|
||||
Lookup(key string) (interface{}, bool)
|
||||
|
||||
// First returns the "first" value in the map, if any, or nil.
|
||||
First() interface{}
|
||||
|
||||
// Size returns the number of key value pairs in the map.
|
||||
// This takes O(1) time.
|
||||
Size() int
|
||||
@@ -348,6 +351,10 @@ func lookupLowLevel(self *tree, partialHash, hash uint64) (interface{}, bool) {
|
||||
return self.value, true
|
||||
}
|
||||
|
||||
func (m *tree) First() interface{} {
|
||||
return m.value
|
||||
}
|
||||
|
||||
func (m *tree) Size() int {
|
||||
return m.count
|
||||
}
|
||||
|
||||
4
vendor/manifest
vendored
4
vendor/manifest
vendored
@@ -1211,8 +1211,8 @@
|
||||
"importpath": "github.com/weaveworks/ps",
|
||||
"repository": "https://github.com/weaveworks/ps",
|
||||
"vcs": "git",
|
||||
"revision": "70d17b2d6f760345ef36a0748751eddf7290a92c",
|
||||
"branch": "master",
|
||||
"revision": "26c07ef9a67b5bd2f5707b9a1957e7492776d945",
|
||||
"branch": "map-first",
|
||||
"notests": true
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user