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

Get the time-consuming of a specific event by name #13

Open
lmtss opened this issue Sep 30, 2022 · 2 comments
Open

Get the time-consuming of a specific event by name #13

lmtss opened this issue Sep 30, 2022 · 2 comments

Comments

@lmtss
Copy link

lmtss commented Sep 30, 2022

I want to use name to get the time-consuming of a method in the program, not through flamegraph.
Maybe add a similar function?

if firestorm::enabled() {
  let time = get_time(name: String);
}
@That3Percent
Copy link
Owner

I'm open to new APIs, but don't have much time for maintenance. Could you open a PR?

Also, I wonder if it would be beneficial to export an intermediate value after profiling with methods to export the flamegraph, or get the time of a method, or introspect in other ways. This method seems hyper specific and a user would have to profile twice if they wanted two names.

@lmtss
Copy link
Author

lmtss commented Oct 11, 2022

I tried making some improvements myself and I found it really not easy to deal with.

This method seems hyper specific and a user would have to profile twice if they wanted two names.

I haven't figured out how to deal with this yet,

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

No branches or pull requests

2 participants