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

Check Simplemetrics is not empty #474

Merged
merged 5 commits into from
Sep 20, 2023
Merged

Check Simplemetrics is not empty #474

merged 5 commits into from
Sep 20, 2023

Conversation

aphralG
Copy link
Contributor

@aphralG aphralG commented Sep 14, 2023

Proposed changes

Check stats.Simplemetrics is not empty

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@aphralG aphralG self-assigned this Sep 14, 2023
@netlify
Copy link

netlify bot commented Sep 14, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 4e37174
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/650af16014249800082e8c83

@github-actions github-actions bot added chore Pull requests for routine tasks dependencies labels Sep 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4747879) 66.29% compared to head (70f7739) 66.30%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #474   +/-   ##
=======================================
  Coverage   66.29%   66.30%           
=======================================
  Files         118      118           
  Lines       13391    13392    +1     
=======================================
+ Hits         8877     8879    +2     
+ Misses       3924     3922    -2     
- Partials      590      591    +1     
Files Changed Coverage Δ
...b.com/nginx/agent/v2/src/core/metrics/aggregate.go 88.42% <100.00%> (+0.12%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

metricsCollections.Data[dimensionsChecksum].RunningSumMap[simpleMetric.Name] = metrics + simpleMetric.GetValue()
} else {
metricsCollections.Data[dimensionsChecksum].RunningSumMap[simpleMetric.Name] = simpleMetric.GetValue()
if stats.GetSimplemetrics() != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be easier to read if you assign a variable here? and reuse it in the range on the line below?

@aphralG aphralG merged commit dbfd11e into main Sep 20, 2023
28 checks passed
@aphralG aphralG deleted the add-save-collection-check branch September 20, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants