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
70d41856
Commit
70d41856
authored
Jul 11, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
695c1dcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+4
-7
No files found.
wcfs/internal/xbtree/δbtail_test.go
View file @
70d41856
...
@@ -33,8 +33,8 @@ package xbtree
...
@@ -33,8 +33,8 @@ package xbtree
//
//
// a) transition a BTree in ZODB through particular tricky tree topologies
// a) transition a BTree in ZODB through particular tricky tree topologies
// and feed ΔBtail through created database transactions.
// and feed ΔBtail through created database transactions.
// b) transition a BTree in ZODB through
random tree topologies and feed
// b) transition a BTree in ZODB through
random tree topologies
// ΔBtail through created database transactions.
//
and feed
ΔBtail through created database transactions.
//
//
// TestΔBTail and TestΔBTailRandom implement approaches "a" and "b" correspondingly.
// TestΔBTail and TestΔBTailRandom implement approaches "a" and "b" correspondingly.
//
//
...
@@ -63,12 +63,10 @@ type Δstring = xbtreetest.Δstring
...
@@ -63,12 +63,10 @@ type Δstring = xbtreetest.Δstring
// trackSet returns what should be ΔBtail.trackSet coverage for specified tracked key set.
// trackSet returns what should be ΔBtail.trackSet coverage for specified tracked key set.
// XXX was method -> change name?
func
trackSet
(
rbs
xbtreetest
.
RBucketSet
,
tracked
setKey
)
blib
.
PPTreeSubSet
{
func
trackSet
(
rbs
xbtreetest
.
RBucketSet
,
tracked
setKey
)
blib
.
PPTreeSubSet
{
// nil = don't compute keyCover
// nil = don't compute keyCover
// (trackSet is called from inside hot inner loop of rebuild test)
// (trackSet is called from inside hot inner loop of rebuild test)
trackSet
:=
_trackSetWithCov
(
rbs
,
tracked
,
nil
)
return
_trackSetWithCov
(
rbs
,
tracked
,
nil
)
return
trackSet
}
}
// trackSetWithCov returns what should be ΔBtail.trackSet and its key coverage for specified tracked key set.
// trackSetWithCov returns what should be ΔBtail.trackSet and its key coverage for specified tracked key set.
...
@@ -166,7 +164,7 @@ func (kadjA KAdjMatrix) Mul(kadjB KAdjMatrix) KAdjMatrix {
...
@@ -166,7 +164,7 @@ func (kadjA KAdjMatrix) Mul(kadjB KAdjMatrix) KAdjMatrix {
return
kadj
return
kadj
}
}
// KAdj
compute
s adjacency matrix for t1 -> t2 transition.
// KAdj
build
s adjacency matrix for t1 -> t2 transition.
//
//
// The set of keys for which kadj matrix is computed can be optionally provided.
// The set of keys for which kadj matrix is computed can be optionally provided.
// This set of keys defaults to allTestKeys(t1,t2).
// This set of keys defaults to allTestKeys(t1,t2).
...
@@ -298,7 +296,6 @@ func _KAdj(t1, t2 *xbtreetest.Commit, keysv ...setKey) (kadj KAdjMatrix) {
...
@@ -298,7 +296,6 @@ func _KAdj(t1, t2 *xbtreetest.Commit, keysv ...setKey) (kadj KAdjMatrix) {
// xverifyΔBTail_rebuild.
// xverifyΔBTail_rebuild.
func
xverifyΔBTail_Update
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
t1
,
t2
*
xbtreetest
.
Commit
)
{
func
xverifyΔBTail_Update
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
t1
,
t2
*
xbtreetest
.
Commit
)
{
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 + kv2 + ∞
// verify transition at1->at2 for all initial states of tracked {keys} from kv1 + kv2 + ∞
t
.
Run
(
fmt
.
Sprintf
(
"Update/%s→%s"
,
t1
.
Tree
,
t2
.
Tree
),
func
(
t
*
testing
.
T
)
{
t
.
Run
(
fmt
.
Sprintf
(
"Update/%s→%s"
,
t1
.
Tree
,
t2
.
Tree
),
func
(
t
*
testing
.
T
)
{
allKeys
:=
allTestKeys
(
t1
,
t2
)
allKeys
:=
allTestKeys
(
t1
,
t2
)
allKeyv
:=
allKeys
.
SortedElements
()
allKeyv
:=
allKeys
.
SortedElements
()
...
...
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