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

Enrich / Customize / Override the function name #10

Open
y2kappa opened this issue Oct 20, 2020 · 0 comments
Open

Enrich / Customize / Override the function name #10

y2kappa opened this issue Oct 20, 2020 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@y2kappa
Copy link
Owner

y2kappa commented Oct 20, 2020

A lot of functions are called new and they can be expensive, like getting a network db handle. it's very unclear what happens when a lot of news appear in your flamegraph.

For that there are 2 options that I see:

  1. Allow overriding from the derive attributes
#[timed::timed(printer = "info!", tracing=true, name="whatever")]
  1. Also (not exclusive to the above), add full module path to this. instead of recording it as "new", record it as "foo::bar::new". There is a macro for this, not sure if it works https://doc.rust-lang.org/std/macro.module_path.html
@y2kappa y2kappa added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant