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

Metrics opt #12288

Merged
merged 14 commits into from
May 17, 2023
Merged

Metrics opt #12288

merged 14 commits into from
May 17, 2023

Conversation

wxbty
Copy link
Member

@wxbty wxbty commented May 10, 2023

What is the purpose of the change

A series of optimizations for the metrics code,make code more reusable and more streamlined

Brief changelog

1、When exporting metrics, application information is optimized from parameter passing to construction injection.
2、Use AbstractMetricsExport to store the public ApplicationModel of each type of Export.
3、Optimize ApplicationStatComposite, because StatComposite belongs to APP level, simplify Map<MetricsKey, Map<String, AtomicLong>> data structure to Map<MetricsKey, AtomicLong>
4、Add an inheritance relationship to the subclass of Metric(ApplicationMetric、ServiceKeyMetric、MethodMetric), so that it is more in line with the relationship between objects and improves code reusability
5、MetricsKey tag adds module id to prevent app conflicts

@AlbumenJ
Copy link
Member

@songxiaosheng PTAL

@songxiaosheng
Copy link
Member

please fix ci problem
image

@wxbty
Copy link
Member Author

wxbty commented May 16, 2023

please fix ci problem image

done

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2023

Codecov Report

Merging #12288 (516d8df) into 3.2 (6777c07) will increase coverage by 0.70%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #12288      +/-   ##
============================================
+ Coverage     68.62%   69.33%   +0.70%     
+ Complexity      114        2     -112     
============================================
  Files          3565     1607    -1958     
  Lines        164663    66250   -98413     
  Branches      27092     9717   -17375     
============================================
- Hits         113008    45934   -67074     
+ Misses        41722    15864   -25858     
+ Partials       9933     4452    -5481     

see 2005 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

10.2% 10.2% Coverage
0.0% 0.0% Duplication

Copy link
Member

@songxiaosheng songxiaosheng left a comment

Choose a reason for hiding this comment

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

LGTM

@songxiaosheng songxiaosheng merged commit b7fc2b9 into apache:3.2 May 17, 2023
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.

4 participants