Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Explicit vs Implicit Filtering #179

Open
rmorshea opened this issue Jan 2, 2018 · 0 comments
Open

Explicit vs Implicit Filtering #179

rmorshea opened this issue Jan 2, 2018 · 0 comments

Comments

@rmorshea
Copy link

rmorshea commented Jan 2, 2018

It would be valuable for users to be able to distinguish between what I'll call "implicit" and "explicit" filtering of calls within the stack. To explain what I mean by this I will refer to a slightly modified example from the docs:

no_filter

In this modified case we include an additional public_function which gets called by secret_function. Now if we want to filter out the secret, the fact that a call to eat leads to public_function is implicit (i.e. there is no line connecting their respective nodes):

implicit_filter_exclude

What I propose is that there be an option to make the connection between eat and public_function "explicit" while still hiding secret_function. I came across a need for this functionality while trying to filter out the presence of a particularly widespread decorator from my call graph. However after having filtered out the decorator my graph became unreadable due to the fact that all call relationships that included it were removed completely (as I demonstrate above).

To overcome the issue of implicit filtering, we would want a graph that looked like this:

explicit_filter_exclude

To do so we can simply replace this line with:

self.call_stack.append(self.call_stack[-1])

I am unsure of whether this is truly the correct way to implement this feature though...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant