changed roaring.NewBitmapBTree to roaring.NewBTreeBitmap

This commit is contained in:
Todd Gruben 2018-02-05 14:24:03 -06:00 committed by Travis Turner
parent 440980384c
commit 23970b98dc
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
3 changed files with 7 additions and 7 deletions

View file

@ -189,7 +189,7 @@ func (f *Fragment) Open() error {
func (f *Fragment) openStorage() error {
// Create a roaring bitmap to serve as storage for the slice.
if f.storage == nil {
f.storage = roaring.NewBitmapBTree()
f.storage = roaring.NewBTreeBitmap()
}
// Open the data file to be mmap'd and used as an ops log.
file, err := os.OpenFile(f.path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)

View file

@ -120,7 +120,7 @@ func NewBitmap(a ...uint64) *Bitmap {
return b
}
func NewBitmapBTree(a ...uint64) *Bitmap {
func NewBTreeBitmap(a ...uint64) *Bitmap {
b := &Bitmap{
conts: NewBTreeContainers(),
}

View file

@ -1176,7 +1176,7 @@ const (
func BenchmarkContainerLinear(b *testing.B) {
for n := 0; n < b.N; n++ {
bm := roaring.NewBitmapBTree()
bm := roaring.NewBTreeBitmap()
for row := uint64(1); row < NumRows; row++ {
for col := uint64(1); col < NumColums; col++ {
bm.Add(row*pilosa.SliceWidth + (col * MaxContainerVal))
@ -1187,7 +1187,7 @@ func BenchmarkContainerLinear(b *testing.B) {
func BenchmarkContainerReverse(b *testing.B) {
for n := 0; n < b.N; n++ {
bm := roaring.NewBitmapBTree()
bm := roaring.NewBTreeBitmap()
for row := NumRows - 1; row >= 1; row-- {
for col := NumColums - 1; col >= 1; col-- {
bm.Add(row*pilosa.SliceWidth + (col * MaxContainerVal))
@ -1198,7 +1198,7 @@ func BenchmarkContainerReverse(b *testing.B) {
func BenchmarkContainerColumn(b *testing.B) {
for n := 0; n < b.N; n++ {
bm := roaring.NewBitmapBTree()
bm := roaring.NewBTreeBitmap()
for col := uint64(1); col < NumColums; col++ {
for row := uint64(1); row < NumRows; row++ {
bm.Add(row*pilosa.SliceWidth + (col * MaxContainerVal))
@ -1210,7 +1210,7 @@ func BenchmarkContainerColumn(b *testing.B) {
func BenchmarkContainerOutsideIn(b *testing.B) {
middle := NumRows / uint64(2)
for n := 0; n < b.N; n++ {
bm := roaring.NewBitmapBTree()
bm := roaring.NewBTreeBitmap()
for col := uint64(1); col < NumColums; col++ {
for row := uint64(1); row < middle; row++ {
@ -1224,7 +1224,7 @@ func BenchmarkContainerOutsideIn(b *testing.B) {
func BenchmarkContainerInsideOut(b *testing.B) {
middle := NumRows / uint64(2)
for n := 0; n < b.N; n++ {
bm := roaring.NewBitmapBTree()
bm := roaring.NewBTreeBitmap()
for col := uint64(1); col < NumColums; col++ {
for row := uint64(1); row <= middle; row++ {
bm.Add((middle+row)*pilosa.SliceWidth + (col * MaxContainerVal))