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

statistics: add branch check for BinarySearchRemoveVal #47562

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Oct 11, 2023

What problem does this PR solve?

Issue Number: ref #47275

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

before:

$ go test -run=^$ -bench=BenchmarkMergePartTopN2GlobalTopNWithHists -benchmem github.com/pingcap/tidb/statistics/handle/globalstats
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/statistics/handle/globalstats
BenchmarkMergePartTopN2GlobalTopNWithHists/Size100-8               79554             13026 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size1000-8               9308            129048 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size10000-8               710           1495563 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size100000-8               60          18915999 ns/op             120 B/op          2 allocs/op

after

$ go test -run=^$ -bench=BenchmarkMergePartTopN2GlobalTopNWithHists -benchmem github.com/pingcap/tidb/statistics/handle/globalstats
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/statistics/handle/globalstats
BenchmarkMergePartTopN2GlobalTopNWithHists/Size100-8               93171             12890 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size1000-8               9405            127764 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size10000-8               876           1357216 ns/op             120 B/op          2 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size100000-8               61          18243436 ns/op             120 B/op          2 allocs/op
  • 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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #47562 (4e2d4ef) into master (318e82b) will increase coverage by 0.8960%.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47562        +/-   ##
================================================
+ Coverage   72.0167%   72.9128%   +0.8960%     
================================================
  Files          1395       1418        +23     
  Lines        404171     410549      +6378     
================================================
+ Hits         291071     299343      +8272     
+ Misses        93509      92375      -1134     
+ Partials      19591      18831       -760     
Flag Coverage Δ
integration 41.2897% <0.0000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser ∅ <ø> (∅)
br 49.0218% <ø> (-4.3432%) ⬇️

@hawkingrei
Copy link
Member Author

/retest

Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 13, 2023
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elsa0520, winoros

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 ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 13, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 13, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-13 06:22:22.157963594 +0000 UTC m=+1378939.745073737: ☑️ agreed by elsa0520.
  • 2023-10-13 06:42:39.262758115 +0000 UTC m=+1380156.849868261: ☑️ agreed by winoros.

@hawkingrei
Copy link
Member Author

/retest

1 similar comment
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 13, 2023
@hawkingrei
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 13, 2023
@ti-chi-bot ti-chi-bot bot merged commit e146d4d into pingcap:master Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants