Commit 16eb6224 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9d6b2ef0
......@@ -449,12 +449,15 @@ func TestΔBTreeAllStructs(t *testing.T) {
// -> keep key range small (dumb increase does not help testing)
// - N(keys) affects N(variants) significantly
// -> keep Nkeys reasonably small/medium (dumb increase does not help testing)
//
// - spawning python subprocess is very slow (takes 300-500ms for
// imports; https://github.com/pypa/setuptools/issues/510)
// -> we spawn `treegen allstructs` once and use request/response approach.
// XXX given (kv1, kv2) test on automatically generated (tree1 -> tree2)
//testing.Short()
// XXX explain that py program startup is very slow due to
// pkg_resources (+ link) -> we use server + request/response.
// !testing.Short() -> increase?
maxdepth := 2 // XXX -> 3?
maxsplit := 1 // XXX -> 2?
n := 10 // XXX -> more?
// random seed
seed := time.Now().UnixNano()
......@@ -466,12 +469,10 @@ func TestΔBTreeAllStructs(t *testing.T) {
t.Fatalf("invalid $DBTail_SEED=%s: %s", seeds, err)
}
}
t.Logf("# seed=%d", seed)
rng := rand.New(rand.NewSource(seed))
t.Logf("# maxdepth=%d maxsplit=%d n=%d seed=%d", maxdepth, maxsplit, n, seed)
maxdepth := 2 // XXX -> 3?
maxsplit := 1 // XXX -> 2?
n := 10 // XXX -> more?
// generate (kv1, kv2) pairs randomly
// keysv1 and keysv2 are random shuffle of IntSets
var keysv1 [][]int
......@@ -501,6 +502,7 @@ func TestΔBTreeAllStructs(t *testing.T) {
for k := range keys1 { kv1[Key(k)] = randv() }
for k := range keys2 { kv2[Key(k)] = randv() }
// given (kv1, kv2) test on automatically generated (tree1 -> tree2)
fmt.Printf("%s -> %s\n", kvtxt(kv1), kvtxt(kv2))
}
......
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