python-hunter icon indicating copy to clipboard operation
python-hunter copied to clipboard

Predefined trace configurations

Open ionelmc opened this issue 8 years ago • 2 comments

Have a set of predefined configurations + actions for common situations like:

  • Django (views, queries etc)
  • Sockets
  • File operations (is it even possible?)
  • You tell me.

ionelmc avatar Mar 05 '16 14:03 ionelmc

I think it would be great if we can have some configuration files (at both user and project level) to specify hunter configuration for the user/project, in addition to those specified in runtime (like flake8 's configuration structure).

For example, I have some common libs like numpy, pandas, matplotlib pre-loaded in ipython's config. So almost always I would like to exclude those, plus the libs that ipython itself uses. This leads to something like:

h.trace(~Q(kind='line'),
    ~Q(module_in=['six', 'pkg_resources', 'autoreload']),
    ~Q(module_startswith=['IPython', 'prompt_toolkit', 'traitlets', 'wcwidth',
        'matplotlib', 'pygments', 'numpy', 'fields',
        'hunter', 'colorama', 'scipy']),
    ~Q(filename=''), stdlib=False)

to be typed for every session.

kawing-chiu avatar Dec 22 '17 02:12 kawing-chiu

I need to ignore everything installed in my virtualenv except for my project files.

abitrolly avatar Feb 04 '21 15:02 abitrolly