mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-29 21:04:23 +01:00
Merge 'Simulator: ignore Property::AllTableHaveExpectedContent when counting stats' from Pedro Muniz
`Property::AllTableHaveExpectedContent` adds a lot of simple Select full table scans to check the DB state. These statements were being counted in `InteractionStats`. The stats are used to calculate the Remaining queries we need to make. By not counting these simple checks we allow the simulator to create more meaningful interactions. Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3643
This commit is contained in:
@@ -201,6 +201,11 @@ impl InteractionPlan {
|
||||
for interactions in &self.plan {
|
||||
match &interactions.interactions {
|
||||
InteractionsType::Property(property) => {
|
||||
if matches!(property, Property::AllTableHaveExpectedContent { .. }) {
|
||||
// Skip Property::AllTableHaveExpectedContent when counting stats
|
||||
// this allows us to generate more relevant interactions as we count less Select's to the Stats
|
||||
continue;
|
||||
}
|
||||
for interaction in &property.interactions(interactions.connection_index) {
|
||||
if let InteractionType::Query(query) = &interaction.interaction {
|
||||
query_stat(query, &mut stats);
|
||||
|
||||
Reference in New Issue
Block a user