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

server: add `/debug/zip` api to get useful debuginfo at once #9651

Merged
merged 5 commits into from Mar 20, 2019

Conversation

@lysu
Copy link
Member

commented Mar 11, 2019

What problem does this PR solve?

when we do troubleshooting often need multiple round-trips to get info from our custom.

to save time we need the ability to get more info at once, just curl or access

http://0.0.0.0:10080/debug/zip

What is changed and how it works?

get go pprof info in one file and maybe we can add more info in future, now after unzip we will got:

  • heap pprof(after gc)
  • mutex pprof
  • cpu pprof (default 10s)
  • full goroutine
  • tidb config info
  • tidb version info

Check List

Tests

  • Manual test (add detailed scripts or steps below)

can be curl and unzip and be go pprof or cat without error

Code changes

  • New code

Side effects

  • N/A

Related changes

  • Need to cherry-pick to the release 2.1

This change is Reviewable

@codecov

This comment has been minimized.

Copy link

commented Mar 11, 2019

Codecov Report

Merging #9651 into master will decrease coverage by 0.0651%.
The diff coverage is 0%.

@@               Coverage Diff                @@
##             master      #9651        +/-   ##
================================================
- Coverage   67.2409%   67.1757%   -0.0652%     
================================================
  Files           381        381                
  Lines         79874      79944        +70     
================================================
- Hits          53708      53703         -5     
- Misses        21381      21451        +70     
- Partials       4785       4790         +5
@jackysp
Copy link
Member

left a comment

Great!
Please add it to the doc file.

@lysu lysu force-pushed the lysu:dev-one-key-pprof branch from 49f8cee to 2a2b9ea Mar 12, 2019

@jackysp
Copy link
Member

left a comment

LGTM

@jackysp

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

LGTM

@tiancaiamao

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

/run-all-tests

@tiancaiamao tiancaiamao merged commit 490d405 into pingcap:master Mar 20, 2019

16 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 0% of diff hit (target 0%)
Details
codecov/project 67.1457% (-0.0952%) compared to a460628
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/code_coverage Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

jackysp added a commit that referenced this pull request Mar 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.