Skip to content

Avoid costly metrics collection when metric collector is NoOpMetricCo… #2174

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

Merged
merged 4 commits into from
Dec 3, 2020

Conversation

croudet
Copy link

@croudet croudet commented Dec 1, 2020

…llector

Description

Avoid costly metrics collection when metric collector is NoOpMetricCollector.

Motivation and Context

Profiling with visualvm shows that collecting metrics takes resources.

Checklist

  • [ x] I have read the CONTRIBUTING document
  • [ x] Local run of mvn install succeeds
  • [ x] My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • [ x] I have read the README document
  • I have added tests to cover my changes
  • [ x] All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • [ x] I confirm that this pull request can be released under the Apache 2 license

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! LGTM

Could you add a changelog entry? You can do so by running the scripts/new-change script and following the instructions and then committing the new file created by the script in .changes/next-release with your changes.

(Make sure the commits are squashed into one)

@croudet croudet force-pushed the avoidCostlyMetricsCollection branch from 588f1a3 to ab59a4a Compare December 2, 2020 13:45
@croudet
Copy link
Author

croudet commented Dec 2, 2020

Done.

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@codecov-io
Copy link

Codecov Report

Merging #2174 (6c3ffe4) into master (3a103f3) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2174   +/-   ##
=========================================
  Coverage     77.44%   77.44%           
  Complexity      328      328           
=========================================
  Files          1222     1222           
  Lines         38304    38304           
  Branches       3018     3018           
=========================================
+ Hits          29663    29665    +2     
+ Misses         7185     7184    -1     
+ Partials       1456     1455    -1     
Flag Coverage Δ Complexity Δ
unittests 77.44% <0.00%> (+<0.01%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
.../amazon/awssdk/core/internal/util/MetricUtils.java 86.95% <0.00%> (ø) 0.00 <0.00> (ø)
...ty/internal/IdleConnectionCountingChannelPool.java 87.80% <0.00%> (+2.43%) 0.00% <0.00%> (ø%)

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 3a103f3...6c3ffe4. Read the comment docs.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2020

Kudos, SonarCloud Quality Gate passed!

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

85.7% 85.7% Coverage
0.0% 0.0% Duplication

@zoewangg zoewangg merged commit d376a94 into aws:master Dec 3, 2020
dagnir added a commit that referenced this pull request Oct 19, 2022
Skip importing ruleset-testing-core internally
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.

3 participants