diff options
| author | Martin Kobetic <mkobetic@gmail.com> | 2014-05-12 19:33:53 +0000 |
|---|---|---|
| committer | Martin Kobetic <mkobetic@gmail.com> | 2014-05-12 19:33:53 +0000 |
| commit | 0716cdaec8e4a0d12085cda61d58ae275028670b (patch) | |
| tree | 0476c09a2ebd78f8412b69c7d727989c4acaf4e0 /bucket.go | |
| parent | merge inline branch into leaf branch (diff) | |
| download | dedo-0716cdaec8e4a0d12085cda61d58ae275028670b.tar.gz dedo-0716cdaec8e4a0d12085cda61d58ae275028670b.tar.xz | |
tweaks
Diffstat (limited to 'bucket.go')
| -rw-r--r-- | bucket.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -371,8 +371,9 @@ func (b *Bucket) Stats() BucketStats { b.forEachPage(func(p *page, depth int) { if (p.flags & leafPageFlag) != 0 { s.KeyN += int(p.count) - used := pageHeaderSize + (leafPageElementSize * int(p.count)) + used := pageHeaderSize if p.count != 0 { + used += leafPageElementSize * int(p.count-1) lastElement := p.leafPageElement(p.count - 1) used += int(lastElement.pos + lastElement.ksize + lastElement.vsize) } |
