Commit 70d41856 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 695c1dcc
...@@ -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 computes adjacency matrix for t1 -> t2 transition. // KAdj builds 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()
......
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