tidb icon indicating copy to clipboard operation
tidb copied to clipboard

WIP: test: Add auto-analyze priority calculator test suite

Open 0xPoe opened this issue 1 year ago • 4 comments

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:

  1. A new test file calculator_analysis_test.go that implements the test logic.
  2. 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

0xPoe avatar Aug 27 '24 07:08 0xPoe

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:

codecov[bot] avatar Aug 27 '24 08:08 codecov[bot]

/retest

0xPoe avatar Aug 29 '24 07:08 0xPoe

/retest

0xPoe avatar Aug 29 '24 08:08 0xPoe

/retest

0xPoe avatar Aug 29 '24 09:08 0xPoe

/hold

time-and-fate avatar Sep 20 '24 08:09 time-and-fate

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Sep 20 '24 08:09 ti-chi-bot[bot]

[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.

ti-chi-bot[bot] avatar Sep 20 '24 08:09 ti-chi-bot[bot]

/unhold

0xPoe avatar Sep 20 '24 13:09 0xPoe