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

Have a way to tell the tracer to completely skip tracing in some cases #66

Open
ionelmc opened this issue Jun 9, 2019 · 0 comments
Open

Comments

@ionelmc
Copy link
Owner

ionelmc commented Jun 9, 2019

Python allows tracers to:

  • skip being called for line events (f_trace_lines=False for Python 3.7+)
  • skip being called for subsequent calls (don't return the trace func or don't set f_trace for pure or C implementations)

Hunter has some filters that could easily benefit from those (currently Hunter's always drills down):

  • depth
  • depth_lt
  • kind_in='return call exception'
  • kind_nin='line' or kind_neq='line' (not implemented yet)

There could we two ways to tackle this:

  • Implement some sort of LeanTracer that does filtering itself.
  • Augment current tracer to have skip flags and checks in Query to set said flags. The trick would be how to detect that Query is root one (and only then perform the skips).

Ref #45.

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

1 participant