Skip to content

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #52215

Problem Summary:

Use the hex string in goroutine labels. It'll allow us to use the go tool pprof and graphviz to handle the protobuf.

Before this PR returned, you can workaround by generating a dot file, and use iconv to handle the non-utf8 characters manually.

What changed and how does it work?

Use the pre-ecoded hex string, rather than bytes.

Check List

Tests

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

Run any tests (which runs at least some SQLs) and profile it with -cpuprofile, and you'll find the protobuf is useable now.

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 28, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Merging #52216 (f12e744) into master (b96f081) will increase coverage by 0.0046%.
Report is 54 commits behind head on master.
The diff coverage is 81.4814%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52216        +/-   ##
================================================
+ Coverage   70.7107%   70.7154%   +0.0046%     
================================================
  Files          1487       1546        +59     
  Lines        439605     455441     +15836     
================================================
+ Hits         310848     322067     +11219     
- Misses       109287     113411      +4124     
- Partials      19470      19963       +493     
Flag Coverage Δ
integration 48.9100% <28.0000%> (?)
unit 71.0714% <81.4814%> (+0.5477%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 27.3835% <ø> (-18.4606%) ⬇️

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 1, 2024
@YangKeao YangKeao force-pushed the fix-pprof-label branch 2 times, most recently from bb43e3f to 6193ce1 Compare April 1, 2024 07:03
@YangKeao YangKeao changed the title topsql, pprof: use string but not bytes sql/plan digest in goroutine label topsql, pprof: use hex string but not bytes sql/plan digest in goroutine label Apr 1, 2024
@YangKeao YangKeao changed the title topsql, pprof: use hex string but not bytes sql/plan digest in goroutine label topsql, pprof: use hex string but not binary sql/plan digest in goroutine label Apr 1, 2024
@YangKeao
Copy link
Member Author

YangKeao commented Apr 1, 2024

/hold

Wait for @crazycs520's review to confirm it'll not break the TopSQL functionality 🤔. Please unhold it when @crazycs520 thinks it's ready.

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

ti-chi-bot bot commented Apr 1, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-01 11:59:10.057597169 +0000 UTC m=+272411.585137707: ☑️ agreed by lance6716.
  • 2024-04-01 13:41:21.52315747 +0000 UTC m=+278543.050698015: ☑️ agreed by crazycs520.

@YangKeao
Copy link
Member Author

YangKeao commented Apr 2, 2024

/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 Apr 2, 2024
Copy link

ti-chi-bot bot commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crazycs520, hawkingrei, lance6716

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:
  • OWNERS [crazycs520,hawkingrei,lance6716]

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

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit 8f5f608 into pingcap:master Apr 2, 2024
@hawkingrei
Copy link
Member

/cherrypick release-7.5
/cherrypick release-7.1
/cherrypick release-6.5

@ti-chi-bot
Copy link
Member

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

In response to this:

/cherrypick release-7.5
/cherrypick release-7.1
/cherrypick release-6.5

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 Apr 3, 2024
@ti-chi-bot
Copy link
Member

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

In response to this:

/cherrypick release-7.5
/cherrypick release-7.1
/cherrypick release-6.5

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 Apr 3, 2024
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.5: #52324.

In response to this:

/cherrypick release-7.5
/cherrypick release-7.1
/cherrypick release-6.5

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.

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.

The captured pprof of Test and Benchmark protobuf cannot be decoded properly
5 participants