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

[feature] setup profiler and don't bother to enable debug level log #1111

Merged
merged 1 commit into from
Apr 15, 2018

Conversation

yyb196
Copy link
Collaborator

@yyb196 yyb196 commented Apr 11, 2018

Signed-off-by: Frank Yang yyb196@gmail.com

Ⅰ. Describe what this PR did

In production environment i need to enable profilers like pprof stack dumping and gops always for the emergency cases or odd cases, in these cases i need to attach to the running pouchd to get the cpu memory or goroutine 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

Signed-off-by: Frank Yang <yyb196@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #1111 into master will increase coverage by 0.84%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
+ Coverage    15.8%   16.65%   +0.84%     
==========================================
  Files         163      164       +1     
  Lines        8793     8846      +53     
==========================================
+ Hits         1390     1473      +83     
+ Misses       7300     7267      -33     
- Partials      103      106       +3
Impacted Files Coverage Δ
client/client.go 31.03% <0%> (-8.36%) ⬇️
cli/cli.go 0% <0%> (ø) ⬆️
cli/command.go 0% <0%> (ø)
pkg/utils/utils.go 78.15% <0%> (+3.15%) ⬆️

@yyb196
Copy link
Collaborator Author

yyb196 commented Apr 12, 2018

@allencloud @HusterWan please help to review this pr

@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Apr 15, 2018
@allencloud allencloud merged commit 453e2ed into AliyunContainerService:master Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/log kind/bug This is bug report for project kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants