featurebase/roaring/inst.go
Seebs 8fb8bb3609 add btree tests
The upstream btree code has a test file, this is an import
of that test file, adjusted/adapted to make it work with our
de-genericized uint64/*Container implementation, so we have some
tests and benchmarks available for the btree implementation itself.
2019-03-28 15:42:00 -05:00

27 lines
341 B
Go

// +build btreeInstrumentation
package roaring
type dTree struct {
t *tree
}
type treeInst struct {
deCopied int64
}
func (t *tree) didCopy(n int) {
t.deCopied += int64(n)
}
func (d *d) didCopy(n int) {
d.t.deCopied += int64(n)
}
func (t *tree) countCopies() int64 {
return t.deCopied
}
func (d *d) setTree(t *tree) {
d.t = t
}