mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 23:51:03 +00:00
Don't test quite so many values for BtreeSeek and BtreeDelete
BtreeSeek is O(N^2) on its N, and there's not a ton of extra utility to testing a larger range of values, so we reduce N by a bit, cutting runtime from ~10s to <1s on my laptop. Also reduce the scale of the BtreeDelete1/BtreeDelete2 tests a bit because, again, lots of runtime for little marginal information.
This commit is contained in:
parent
e223c79ace
commit
3f0c9925f4
1 changed files with 3 additions and 3 deletions
|
|
@ -689,7 +689,7 @@ func TestBtreeDelete0(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestBtreeDelete1(t *testing.T) {
|
||||
const N = 130000
|
||||
const N = 13000
|
||||
for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} {
|
||||
r := treeNew()
|
||||
set := r.Set
|
||||
|
|
@ -788,7 +788,7 @@ func benchmarkDelRnd(b *testing.B, n int) {
|
|||
}
|
||||
|
||||
func TestBtreeDelete2(t *testing.T) {
|
||||
const N = 100000
|
||||
const N = 10000
|
||||
for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} {
|
||||
r := treeNew()
|
||||
set := r.Set
|
||||
|
|
@ -1468,7 +1468,7 @@ func TestBtreePut(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestBtreeSeek(t *testing.T) {
|
||||
const N = 1 << 13
|
||||
const N = 1 << 11
|
||||
tr := treeNew()
|
||||
for i := 0; i < N; i++ {
|
||||
k := 2*i + 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue