-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[cherry-pick] feat(cmd/debuginfo) add new metrics to be collected #7562
Merged
OmarAyo
merged 1 commit into
release/v20.11
from
omar/cherry-pick-debuginfo-improvments
Mar 12, 2021
Merged
[cherry-pick] feat(cmd/debuginfo) add new metrics to be collected #7562
OmarAyo
merged 1 commit into
release/v20.11
from
omar/cherry-pick-debuginfo-improvments
Mar 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- This PR adds 5 new metrics (/jemalloc, /state, /health, /debug/vars, /metrics) to be collected when running the `debuginfo` - the flag `-p` has been changed to `-m` to reflect the change. This new flag will let you pick up one or multiple metrics/pprof to be collected: ``` -m, --metrics strings List of metrics & profile to dump in the report. (default [jemalloc,state,health,vars,metrics,heap,cpu_profile,trace,goroutine,threadcreate,block,mutex]) ``` - default value of `-s` flag is now 30sec since it requires 30s to collect a cpu profile - when saving the metric/profile - it will log the metric/profile name and the path where it's saving to. - added new flag for time based profiles that are cpu and trace profiles: ``` -c, --cron_pprof strings time-based pprof (default [cpu_profile,trace]) ``` output of running the `debuginfo` command: ``` dgraph debuginfo -s 30 I0305 21:01:44.730085 10587 run.go:126] using directory /tmp/dgraph-debuginfo041885197 for debug info dump. I0305 21:01:44.730251 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/jemalloc I0305 21:01:44.730261 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.731077 10587 debugging.go:51] saving jemalloc metric in /tmp/dgraph-debuginfo041885197/alpha_jemalloc.gz I0305 21:01:44.731086 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/state I0305 21:01:44.731092 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.731720 10587 debugging.go:51] saving state metric in /tmp/dgraph-debuginfo041885197/alpha_state.gz I0305 21:01:44.731731 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/health I0305 21:01:44.731736 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.732048 10587 debugging.go:51] saving health metric in /tmp/dgraph-debuginfo041885197/alpha_health.gz I0305 21:01:44.732058 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/vars I0305 21:01:44.732065 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.732557 10587 debugging.go:51] saving vars metric in /tmp/dgraph-debuginfo041885197/alpha_vars.gz I0305 21:01:44.732568 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/metrics I0305 21:01:44.732573 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.734904 10587 debugging.go:51] saving metrics metric in /tmp/dgraph-debuginfo041885197/alpha_metrics.gz I0305 21:01:44.734912 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/heap I0305 21:01:44.734917 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.738036 10587 debugging.go:51] saving heap metric in /tmp/dgraph-debuginfo041885197/alpha_heap.gz I0305 21:01:44.738048 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/goroutine?debug=2 I0305 21:01:44.738057 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.739136 10587 debugging.go:51] saving goroutine metric in /tmp/dgraph-debuginfo041885197/alpha_goroutine.gz I0305 21:01:44.739145 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/threadcreate I0305 21:01:44.739151 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.740182 10587 debugging.go:51] saving threadcreate metric in /tmp/dgraph-debuginfo041885197/alpha_threadcreate.gz I0305 21:01:44.740192 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/block I0305 21:01:44.740198 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.741154 10587 debugging.go:51] saving block metric in /tmp/dgraph-debuginfo041885197/alpha_block.gz I0305 21:01:44.741163 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/mutex I0305 21:01:44.741169 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.742330 10587 debugging.go:51] saving mutex metric in /tmp/dgraph-debuginfo041885197/alpha_mutex.gz I0305 21:01:44.742341 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/profile?seconds=30s I0305 21:01:44.742348 10587 debugging.go:76] please wait... (30s) I0305 21:02:14.812492 10587 debugging.go:63] saving cpu_profile metric in /tmp/dgraph-debuginfo041885197/alpha_cpu_profile.gz I0305 21:02:14.812570 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/trace?seconds=30s I0305 21:02:14.812596 10587 debugging.go:76] please wait... (30s) I0305 21:02:15.816449 10587 debugging.go:63] saving trace metric in /tmp/dgraph-debuginfo041885197/alpha_trace.gz I0305 21:02:15.842375 10587 run.go:159] Debuginfo archive successful: dgraph-debuginfo041885197.tar.gz ``` (cherry picked from commit 79ada0e)
OmarAyo
requested review from
danielmai,
manishrjain and
vvbalaji-dgraph
as code owners
March 12, 2021 17:04
OmarAyo
changed the title
feat(cmd/debuginfo) add new metrics to be collected (#7439)
feat(cmd/debuginfo) add new metrics to be collected
Mar 12, 2021
OmarAyo
changed the title
feat(cmd/debuginfo) add new metrics to be collected
[cherry-pick] feat(cmd/debuginfo) add new metrics to be collected
Mar 12, 2021
danielmai
approved these changes
Mar 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
debuginfo
-p
has been changed to-m
to reflect the change. This new flag will let you pick up one or multiple metrics/pprof to be collected:-s
flag is now 30sec since it requires 30s to collect a cpu profileoutput of running the
debuginfo
command:(cherry picked from commit 79ada0e)
This change is