Commit d5a07d5f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3c207b7c
......@@ -527,6 +527,17 @@ func (rc rangeCover) Get(k Key) *nodeInRange {
return rn
}
func (rc rangeCover) String() string {
s := ""
for _, rn := range rc {
if s != "" {
s += " "
}
s += fmt.Sprintf("[%v,%v]%s", rn.lo, rn.hi_, vnode(rn.node))
}
return s
}
// treediff computes δT for tree specified by root in between old..new.
......@@ -1078,18 +1089,21 @@ func vtree(v []TreeEntry) string {
if s != "" {
s += " "
}
c := e.Child()
ckind := "?"
switch c.(type) {
case *Tree: ckind = "T"
case *Bucket: ckind = "B"
}
s += fmt.Sprintf("%v %s%s", e.Key(), ckind, c.POid())
s += fmt.Sprintf("%v %s", e.Key(), vnode(e.Child()))
}
return s
}
// vnode returns brief huan-readable representation of node.
func vnode(node Node) string {
kind := "?"
switch node.(type) {
case *Tree: kind = "T"
case *Bucket: kind = "B"
}
return fmt.Sprintf("%s%s", kind, node.POid())
}
func (track nodeTrack) String() string {
return fmt.Sprintf("{p%s k%s}", track.parent, track.trackedKeys)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment