Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
16eb6224
Commit
16eb6224
authored
Jun 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9d6b2ef0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+11
-9
No files found.
wcfs/δbtail_test.go
View file @
16eb6224
...
...
@@ -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
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment