adjust remaining calculation to use the profile

This commit is contained in:
pedrocarlo
2025-08-28 17:26:36 -03:00
parent 962666831b
commit 2f237fdcfd
6 changed files with 159 additions and 122 deletions

View File

@@ -20,11 +20,11 @@ impl ArbitraryFrom<&Remaining> for Query {
Box::new(|rng| Self::Create(Create::arbitrary(rng, context))),
),
(
remaining.read,
remaining.select,
Box::new(|rng| Self::Select(Select::arbitrary(rng, context))),
),
(
remaining.write,
remaining.insert,
Box::new(|rng| Self::Insert(Insert::arbitrary(rng, context))),
),
(
@@ -32,7 +32,7 @@ impl ArbitraryFrom<&Remaining> for Query {
Box::new(|rng| Self::Update(Update::arbitrary(rng, context))),
),
(
f64::min(remaining.write, remaining.delete),
remaining.insert.min(remaining.delete),
Box::new(|rng| Self::Delete(Delete::arbitrary(rng, context))),
),
],