[feature] setup profiler and don't bother to enable debug level log #1111
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.
Signed-off-by: Frank Yang [email protected]
Ⅰ. Describe what this PR did
In production environment i need to enable profilers like
pprof
stack dumping
andgops
always for the emergency cases or odd cases, in these cases i need to attach to the running pouchd to get thecpu
memory
orgoroutine stack
snapshot online, and then analyze why the odd things happen, but in these case we don't want alway print debug level log, which is too much output all the time.This pr enables users to setup profilers and do not bother to always open debug log output. and if debug log level is specified, it's both enable debug level and setup profilers.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews