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

Move tracing "intercept" methods to _HookCaller? #262

Open
goodboy opened this issue Jun 3, 2020 · 1 comment
Open

Move tracing "intercept" methods to _HookCaller? #262

goodboy opened this issue Jun 3, 2020 · 1 comment

Comments

@goodboy
Copy link
Contributor

goodboy commented Jun 3, 2020

This relates to #217 as well as discussion in other issues.

The main refactoring would include:

  • moving PluginManager._inner_hookexec lambda indirection onto the _HookCaller
  • possibly (and subsequently) remove PluginManager._hookexec entirely
  • re-work the tracing methods to support per hook tracing and if global tracing is desired have the manager loop through all underlying callers to insert trace functions.
This was referenced Jun 4, 2020
@bluetech
Copy link
Member

The first point is covered by #280.

For the second point I have a plan as well, will submit after the first PR is merged.

As for point 3, it should be possible, however the implementation plan of iterating over all _HookCallers is foiled by PluginManager.subset_hook_caller() which returns an untracked _HookCaller (and we probably don't want to track it, unless using weak references).

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