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

ProcessCollector: initialize on first use #14

Merged
merged 1 commit into from
Nov 29, 2023
Merged

ProcessCollector: initialize on first use #14

merged 1 commit into from
Nov 29, 2023

Conversation

fredrikekre
Copy link
Owner

This patch changes how the ProcessCollector is initialized. Previously some values where read from /proc filesystem in the constructor but since typically a collector is defined as a global variable this results in values beeing cached from precompilation. With this patch the collector is initialized on first use (first Prometheus.collect!) instead.

This patch changes how the ProcessCollector is initialized. Previously
some values where read from /proc filesystem in the constructor but
since typically a collector is defined as a global variable this results
in values beeing cached from precompilation. With this patch the
collector is initialized on first use (first `Prometheus.collect!`)
instead.
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

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

Comparison is base (d0d19ae) 97.59% compared to head (7837925) 97.65%.

Files Patch % Lines
src/process_collector.jl 89.74% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   97.59%   97.65%   +0.06%     
==========================================
  Files           3        3              
  Lines         457      470      +13     
==========================================
+ Hits          446      459      +13     
  Misses         11       11              

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

@fredrikekre fredrikekre merged commit 64fdfde into master Nov 29, 2023
10 checks passed
@fredrikekre fredrikekre deleted the fe/prec branch November 29, 2023 14:16
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.

1 participant