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

optimize: add a option to controls whether debugPrintRoute executes #269

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Conversation

L2ncE
Copy link
Member

@L2ncE L2ncE commented Sep 23, 2022

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.

添加一个选项来控制是否执行 debugPrintRoute

(Optional) More detail description for this PR(en: English/zh: Chinese).

en: Added an option to control whether to print the route's log when it starts running, the default is to print. If panic occurs when there are many routes, because there is a lot of routing startup information, panic cannot be seen intuitively. Adding this option can avoid such a situation.

zh(optional): 新增了一个可选项来控制是否在开始运行时打印路由的日志,默认为打印。在路由较多时若发生panic,由于有大量的路由启动信息,因此不能直观的看到panic,增加此可选项后可避免此类情况出现。

Which issue(s) this PR fixes:

Fixes #268

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 59.27% // Head: 59.99% // Increases project coverage by +0.71% 🎉

Coverage data is based on head (4ef5d9d) compared to base (ac34fef).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #269      +/-   ##
===========================================
+ Coverage    59.27%   59.99%   +0.71%     
===========================================
  Files           79       79              
  Lines         8150     8156       +6     
===========================================
+ Hits          4831     4893      +62     
+ Misses        2966     2910      -56     
  Partials       353      353              
Impacted Files Coverage Δ
pkg/app/server/option.go 89.91% <100.00%> (+0.35%) ⬆️
pkg/common/config/option.go 100.00% <100.00%> (+100.00%) ⬆️
pkg/route/engine.go 62.06% <100.00%> (+0.08%) ⬆️
pkg/common/compress/compress.go 83.80% <0.00%> (+2.85%) ⬆️
pkg/common/config/request_option.go 100.00% <0.00%> (+23.52%) ⬆️
pkg/common/config/client_option.go 100.00% <0.00%> (+100.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@li-jin-gou li-jin-gou changed the title feat: add a option to controls whether debugPrintRoute executes optimise: add a option to controls whether debugPrintRoute executes Sep 23, 2022
@li-jin-gou li-jin-gou changed the title optimise: add a option to controls whether debugPrintRoute executes optimize: add a option to controls whether debugPrintRoute executes Sep 23, 2022
pkg/route/engine.go Outdated Show resolved Hide resolved
Copy link
Member

@welkeyever welkeyever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@welkeyever welkeyever merged commit 6241987 into cloudwego:develop Sep 26, 2022
@li-jin-gou
Copy link
Member

cc @Skyenought

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

optimize: add a option to controls whether debugPrintRoute executes
3 participants