tidb
tidb copied to clipboard
WIP: test: Add auto-analyze priority calculator test suite
What problem does this PR solve?
Issue Number: close https://github.com/pingcap/tidb/issues/55682
Problem Summary: We needed a comprehensive test suite to ensure the stability and effectiveness of the auto-analyze priority calculator. 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.
What changed and how does it work?
This PR introduces a new test suite for the auto-analyze priority calculator. The main components of this change are:
- A new test file
calculator_analysis_test.gothat implements the test logic. - A README file explaining the test's purpose and functionality.
Check List
Tests
- [x] Unit test
- [ ] Integration test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test
- [ ] I checked and no code files have been changed.
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility
Documentation
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
None
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 56.5490%. Comparing base (
68fdf55) to head (21af778). Report is 18 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #55683 +/- ##
=================================================
- Coverage 72.9122% 56.5490% -16.3633%
=================================================
Files 1631 1758 +127
Lines 448528 636529 +188001
=================================================
+ Hits 327032 359951 +32919
- Misses 101356 252025 +150669
- Partials 20140 24553 +4413
| Flag | Coverage Δ | |
|---|---|---|
| integration | 38.4404% <ø> (?) |
|
| unit | 72.4751% <ø> (+0.4170%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | 52.9567% <ø> (ø) |
|
| parser | ∅ <ø> (∅) |
|
| br | 52.8652% <ø> (+7.0733%) |
:arrow_up: |
/retest
/retest
/retest
/hold
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: qw4990, time-and-fate
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~pkg/statistics/OWNERS~~ [qw4990,time-and-fate]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2024-09-19 09:38:12.343835743 +0000 UTC m=+1126762.084259683: :ballot_box_with_check: agreed by qw4990.2024-09-20 08:53:22.646038069 +0000 UTC m=+1210472.386462007: :ballot_box_with_check: agreed by time-and-fate.
/unhold