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

Enhancement/normalize metric field #170

Merged
merged 3 commits into from
Oct 11, 2018

Conversation

CarpenterLee
Copy link
Contributor

Describe what this PR does / why we need it

Some field name or method name about metric is ambiguous or inconsistent, for example the MetricNode.exception is in fact exceptionQps other than total exception count, method name Node.blockedQps() and Node.passQps() are not in the save tense.

This may increase understanding costs and lead misuse of monitoring information.

Does this pull request fix one issue?

Fixes #169

Describe how you did it

Refactor the field and method names in MetricNode, Node, NodeVo, etc. to make it clear.

Describe how to verify it

None.

Special notes for reviews

Invite @konglz to review the code.

rename exception to exceptionQps;
remove ed postfix of all field in metrics.
rename exception to exceptionQps;
remove ed postfix of all field in metrics.
@CarpenterLee CarpenterLee added the to-review To review label Oct 10, 2018
@CarpenterLee CarpenterLee self-assigned this Oct 10, 2018
@codecov-io
Copy link

codecov-io commented Oct 10, 2018

Codecov Report

Merging #170 into master will increase coverage by 0.31%.
The diff coverage is 44.73%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #170      +/-   ##
============================================
+ Coverage     51.15%   51.46%   +0.31%     
- Complexity      822      829       +7     
============================================
  Files           139      139              
  Lines          4737     4737              
  Branches        672      672              
============================================
+ Hits           2423     2438      +15     
+ Misses         2030     2009      -21     
- Partials        284      290       +6
Impacted Files Coverage Δ Complexity Δ
...va/com/alibaba/csp/sentinel/node/EntranceNode.java 4.54% <0%> (ø) 1 <0> (ø) ⬇️
...java/com/alibaba/csp/sentinel/context/Context.java 67.64% <0%> (ø) 15 <0> (ø) ⬇️
...p/sentinel/slots/statistic/metric/ArrayMetric.java 64.28% <100%> (ø) 20 <0> (ø) ⬇️
...a/com/alibaba/csp/sentinel/node/StatisticNode.java 65.07% <25%> (ø) 17 <0> (ø) ⬇️
...ava/com/alibaba/csp/sentinel/node/DefaultNode.java 60.34% <33.33%> (ø) 12 <1> (ø) ⬇️
...m/alibaba/csp/sentinel/node/metric/MetricNode.java 52.94% <50%> (ø) 16 <6> (ø) ⬇️
...ba/csp/sentinel/slots/statistic/StatisticSlot.java 61.11% <66.66%> (ø) 10 <0> (ø) ⬇️
...a/csp/sentinel/slots/statistic/base/LongAdder.java 34.04% <0%> (+2.12%) 11% <0%> (+3%) ⬆️
...a/csp/sentinel/slots/statistic/base/LeapArray.java 77.58% <0%> (+3.44%) 19% <0%> (+1%) ⬆️
...a/csp/sentinel/slots/statistic/base/Striped64.java 62.5% <0%> (+12.5%) 10% <0%> (+3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a25f25b...20af7d7. Read the comment docs.

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@CarpenterLee CarpenterLee merged commit 03922db into master Oct 11, 2018
@sczyh30 sczyh30 deleted the enhancement/normalize_metric_field branch October 11, 2018 03:45
@sczyh30 sczyh30 removed the to-review To review label Oct 11, 2018
Arlmls pushed a commit to Arlmls/Sentinel that referenced this pull request Jan 8, 2019
normalize metric fields and methods:
- rename exception to exceptionQps;
- remove ed postfix of all fields and methods about metrics;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalize field and method names about metric
3 participants