-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
sig/plannerSIG: PlannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Add Auto-Analyze Priority Calculator Test Suite
Why This Test Suite Was Added
We've added a comprehensive test suite for the auto-analyze priority calculator to ensure its stability and effectiveness. This calculator is crucial for prioritizing which tables should be analyzed based on various factors such as table size, data changes, and time since last analysis.
How It Works
The test suite operates as follows:
-
Data Generation:
- Creates diverse scenarios using combinations of table sizes, data changes, and time since last analysis.
- Generates realistic test data with constraints like maximum change rate and minimum meaningful change.
-
Priority Calculation:
- Computes weights for each scenario using the priority calculator.
-
Stability Check:
- Compares newly calculated priorities with previously stored results.
- Ensures weight changes don't exceed a 50% threshold for most scenarios.
- Checks that position shifts in priority order don't exceed 3 positions for most scenarios.
-
Test Execution:
- Loads test data from
calculator.csv
. - Calculates new priorities.
- Compares with old priorities from
calculated_priorities.csv
. - Checks for significant changes or shifts.
- Updates
calculated_priorities.csv
if the test passes.
- Loads test data from
-
Failure Conditions:
- The test fails if more than 10% of scenarios have significant weight changes or position shifts.
Metadata
Metadata
Assignees
Labels
sig/plannerSIG: PlannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.