Skip to content

Conversation

oliveromahony
Copy link
Contributor

Proposed changes

Use singleflight for the some of the environment calls in environment.go. This should speed up performance.

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

@netlify
Copy link

netlify bot commented Sep 21, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 591a537
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/6515856d467c5d0008fe52ca

@github-actions github-actions bot added chore Pull requests for routine tasks dependencies labels Sep 21, 2023
Copy link
Collaborator

@dhurley dhurley left a comment

Choose a reason for hiding this comment

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

Can you also update the title of the PR?

@oliveromahony oliveromahony changed the title Perf getsystemuuid Use singleflight for caching environment.go calls Sep 22, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2023

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (394a3fe) 66.28% compared to head (591a537) 66.12%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #481      +/-   ##
==========================================
- Coverage   66.28%   66.12%   -0.16%     
==========================================
  Files         118      118              
  Lines       13382    13411      +29     
==========================================
- Hits         8870     8868       -2     
- Misses       3921     3950      +29     
- Partials      591      593       +2     
Files Coverage Δ
src/core/nginx.go 43.81% <ø> (ø)
...inx/agent/v2/src/core/metrics/collectors/system.go 87.50% <100.00%> (-5.36%) ⬇️
...com/nginx/agent/v2/src/plugins/dataplane_status.go 67.75% <100.00%> (ø)
...om/nginx/agent/v2/src/core/metrics/sources/disk.go 69.56% <75.00%> (-2.44%) ⬇️
src/core/environment.go 51.02% <32.50%> (-1.51%) ⬇️

... and 1 file with indirect coverage changes

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

@oliveromahony oliveromahony merged commit ab04cf2 into main Sep 28, 2023
@oliveromahony oliveromahony deleted the perf-getsystemuuid branch September 28, 2023 14:08
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.

5 participants