You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Too complex to analyze and a lot of cruff because of nose/unittests.
Approach 2
I tried converting this .callgrind trace to a dot file and for every __init__in there, perform a depth-first search to see if it lead to a database function.
Result: also not feasible because of decorators. If a function "A" calls a function decorated with "C" that eventually does DB IO, then a function "B" that does not, but also makes use of this decorator "C" on the call stack, will be marked as doing database IO too.
Approach 3
I created a simple function that loops through the callstack and checks if there is an __init__ present (but not form nose or unittests). If there is, it raises an error. Running the unit tests with this check placed on all DB IO functions result in us detecting __init__s doing IO.
To gain insight into the amount of callers of these managers. Related to #2216.
The text was updated successfully, but these errors were encountered: