Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Auto-Analyze Priority Calculator Test Suite #55682

Closed
Rustin170506 opened this issue Aug 27, 2024 · 0 comments · Fixed by #55683
Closed

Add Auto-Analyze Priority Calculator Test Suite #55682

Rustin170506 opened this issue Aug 27, 2024 · 0 comments · Fixed by #55683
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@Rustin170506
Copy link
Member

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:

  1. 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.
  2. Priority Calculation:

    • Computes weights for each scenario using the priority calculator.
  3. 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.
  4. 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.
  5. Failure Conditions:

    • The test fails if more than 10% of scenarios have significant weight changes or position shifts.
@Rustin170506 Rustin170506 added the type/enhancement The issue or PR belongs to an enhancement. label Aug 27, 2024
@Rustin170506 Rustin170506 added the sig/planner SIG: Planner label Aug 29, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 92d45d5 Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant