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

Removing previous tracers #59

Open
robinsonkwame opened this issue Apr 1, 2019 · 5 comments
Open

Removing previous tracers #59

robinsonkwame opened this issue Apr 1, 2019 · 5 comments

Comments

@robinsonkwame
Copy link

Excellent library, I just started using hunter and have really enjoyed using it.

While playing around with hunter and trace I find that I have a lot of previous references to tracers that I no longer need.

hunter.stop() will set _last_tracer to None but if I make another call to hunter.trace(...) the previous tracers are shown to still reside in memory.

What's the best way to clear out unneeded tracers in hunter?

@ionelmc
Copy link
Owner

ionelmc commented Apr 2, 2019

This sounds like a bug? Do you have an example of how you see the prev tracer still lingering around?

Either way the prev tracer area is going to get some rework to make coverage work smoothly so it would be great to get your example tested.

@ionelmc
Copy link
Owner

ionelmc commented May 29, 2019

@robinsonkwame any update?

@robinsonkwame
Copy link
Author

robinsonkwame commented May 29, 2019 via email

@ionelmc
Copy link
Owner

ionelmc commented May 29, 2019

@robinsonkwame what do you mean by "they were shutdown"?

@ionelmc
Copy link
Owner

ionelmc commented Jun 1, 2019

@robinsonkwame also note that hunter does not warn you about using it like this:

hunter.trace()
hunter.trace()

or:

with hunter.trace():
    with hunter.trace():
        ...

Maybe we could have some sort of warning but how I'd know if the user didn't actually intend to have multiple tracing scopes?

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