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

New macros Prometheus.@time and Prometheus.@inprogress #6

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

fredrikekre
Copy link
Owner

New macros Prometheus.@time and Prometheus.@inprogress:

  • New macro Prometheus.@time collector <expr> for timing <expr> and pass the elapsed time to the collector.
  • New macro Prometheus.@inprogress collector <expr> to track number of in-progress concurrent evalutations of <expr>.

In both cases, <expr> can be a single expression, a block, or a function definition. In the latter case, all calls to the function will be instrumented (no matter the call site). See documentation for more details.

Copy link

codecov bot commented Nov 12, 2023

Codecov Report

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

Files Coverage Δ
src/Prometheus.jl 94.44% <83.87%> (-1.28%) ⬇️

📢 Thoughts on this report? Let us know!

@fredrikekre fredrikekre force-pushed the fe/decorations branch 2 times, most recently from 057d738 to ff8fc57 Compare November 12, 2023 00:07
- New macro `Prometheus.@time collector <expr>` for timing `<expr>` and
  pass the elapsed time to the collector.
- New macro `Prometheus.@inprogress collector <expr>` to track number of
  in-progress concurrent evalutations of `<expr>`.

In both cases, `<expr>` can be a single expression, a block, or a
function *definition*. In the latter case, all calls to the function
will be instrumented (no matter the call site). See documentation for
more details.
@fredrikekre fredrikekre merged commit 15d42c0 into master Nov 12, 2023
@fredrikekre fredrikekre deleted the fe/decorations branch November 12, 2023 00:21
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