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

*: avoid copy in the SortSampleItems #48683

Merged
merged 7 commits into from
Nov 24, 2023

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Nov 17, 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 -benchmem -run=^$ -bench ^BenchmarkBuildHistAndTopN$ github.com/pingcap/tidb/pkg/statistics
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/statistics
BenchmarkBuildHistAndTopN-8            1        1363438291 ns/op        72031328 B/op    4000055 allocs/op

after

$ go test -benchmem -run=^$ -bench ^BenchmarkBuildHistAndTopN$ github.com/pingcap/tidb/pkg/statistics
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/statistics
BenchmarkBuildHistAndTopN-8            1        1352474167 ns/op        64027744 B/op    4000054 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

@hawkingrei hawkingrei added the skip-issue-check Indicates that a PR no need to check linked issue. label Nov 17, 2023
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-linked-issue labels Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #48683 (9474b87) into master (26db590) will decrease coverage by 17.2115%.
Report is 10 commits behind head on master.
The diff coverage is 90.3508%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #48683         +/-   ##
=================================================
- Coverage   71.0004%   53.7889%   -17.2115%     
=================================================
  Files          1367       1587        +220     
  Lines        404899     599562     +194663     
=================================================
+ Hits         287480     322498      +35018     
- Misses        97382     254474     +157092     
- Partials      20037      22590       +2553     
Flag Coverage Δ
integration 35.2820% <60.5263%> (?)
unit 71.2784% <85.5263%> (+0.2779%) ⬆️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 55.6365% <59.2592%> (+2.5557%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2023
@hawkingrei hawkingrei removed the skip-issue-check Indicates that a PR no need to check linked issue. label Nov 17, 2023
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 17, 2023
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 17, 2023
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 20, 2023
Copy link

ti-chi-bot bot commented Nov 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 20, 2023
Copy link

ti-chi-bot bot commented Nov 20, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-20 01:36:50.796753354 +0000 UTC m=+195439.461979549: ☑️ agreed by winoros.
  • 2023-11-20 03:37:14.98314885 +0000 UTC m=+202663.648375045: ☑️ agreed by qw4990.

@hawkingrei
Copy link
Member Author

/hold

waiting for the benchmark test

@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 Nov 20, 2023
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 21, 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 Nov 24, 2023
@hawkingrei hawkingrei removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 24, 2023
@hawkingrei
Copy link
Member Author

/test all

@hawkingrei
Copy link
Member Author

/retest

@hawkingrei
Copy link
Member Author

/test all

@ti-chi-bot ti-chi-bot bot merged commit 4279cd6 into pingcap:master Nov 24, 2023
@hawkingrei hawkingrei deleted the avoid_copy_in_the branch November 24, 2023 13:57
@hawkingrei
Copy link
Member Author

/cherrypick release-6.5
/cherrypick release-7.1

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-6.5: #49535.

In response to this:

/cherrypick release-6.5
/cherrypick release-7.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 18, 2023
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.1: #49536.

In response to this:

/cherrypick release-6.5
/cherrypick release-7.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 18, 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants