Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

feat(api): dump profile data through http request #446

Merged
merged 4 commits into from
Sep 10, 2020

Conversation

zeroqn
Copy link
Contributor

@zeroqn zeroqn commented Sep 9, 2020

What this PR does / why we need it:

This PR integrated pprof-rs into core-api through
configuration enable_dump_profile.

Usage example:

curl http://127.0.0.1:8000/dump_profile\?duration=30\&\&report=flamegraph > flamegraph.svg

Or go pprof support

curl http://127.0.0.1:8000/dump_profile\?duration=30\&\&report=pprof > profile.pb
pprof -svg profile.pb

Which issue(s) this PR fixes:

Fixes #

Which docs this PR relation:

Ref #
nervosnetwork/muta-docs#64

Which toolchain this PR adaption:

No Breaking Change

Special notes for your reviewer:

@yejiayu
Copy link
Contributor

yejiayu commented Sep 9, 2020

How about opening this feature with a configuration file?

@zeroqn
Copy link
Contributor Author

zeroqn commented Sep 9, 2020

How about opening this feature with a configuration file?

Ok, seems more convenience.

@yejiayu
Copy link
Contributor

yejiayu commented Sep 9, 2020

Update muta docs @zeroqn

@zeroqn
Copy link
Contributor Author

zeroqn commented Sep 9, 2020

Update muta docs @zeroqn

Done

@yejiayu
Copy link
Contributor

yejiayu commented Sep 10, 2020

/lgtm

@muta-robot muta-robot added the lgtm #8ef42e label Sep 10, 2020
@muta-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yejiayu

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

@muta-robot muta-robot merged commit 31d66ab into nervosnetwork:master Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants