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

call underlying os.Hostname instead of the entire hostInfo gopsutil call #479

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

oliveromahony
Copy link
Contributor

@oliveromahony oliveromahony commented Sep 19, 2023

Proposed changes

Reduces the allocs per operation from 271 to 1 for GetHostname call

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 19, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 482674c
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/650c32e23c45e60008e443ee

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

codecov-commenter commented Sep 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.09% 🎉

Comparison is base (4747879) 66.29% compared to head (d88b7d8) 66.39%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
+ Coverage   66.29%   66.39%   +0.09%     
==========================================
  Files         118      118              
  Lines       13391    13389       -2     
==========================================
+ Hits         8877     8889      +12     
+ Misses       3924     3910      -14     
  Partials      590      590              
Files Changed Coverage Δ
src/core/environment.go 52.52% <0.00%> (+0.16%) ⬆️

... and 3 files with indirect coverage changes

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

@oliveromahony oliveromahony merged commit 556e620 into main Sep 21, 2023
27 checks passed
@oliveromahony oliveromahony deleted the perf-hostname branch September 21, 2023 15:09
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.

4 participants