add queue
This commit is contained in:
parent
1d3b622b73
commit
db76fbb27b
@ -906,13 +906,13 @@ fn queue() {
|
||||
|
||||
let mut j = 0;
|
||||
let mut i = 0;
|
||||
for _ in 0..200 {
|
||||
for _ in 0..100 {
|
||||
db.transaction(|transaction| {
|
||||
let mut root = transaction.root();
|
||||
|
||||
let n = rng.gen_range(1..20);
|
||||
for _ in 0..n {
|
||||
if rng.gen_bool(0.5) || root.length(transaction) == 0 {
|
||||
if rng.gen_bool(0.6) || root.length(transaction) == 0 {
|
||||
let how_many = rng.gen_range(1..20);
|
||||
let elements = (i..i + how_many).map(U64::from).collect::<Vec<U64>>();
|
||||
root = root.enqueue_many(transaction, &elements);
|
||||
@ -928,11 +928,13 @@ fn queue() {
|
||||
root
|
||||
});
|
||||
|
||||
if rng.gen_bool(0.5) {
|
||||
if rng.gen_bool(0.05) {
|
||||
db.free_old_epochs();
|
||||
}
|
||||
}
|
||||
|
||||
validate(&db);
|
||||
|
||||
db.transaction(|transaction| {
|
||||
let mut root = transaction.root();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user