'Python profiling: Cumtime - sum of subfunctions larger than parent function?
In related questions, people ask about the sum of time spent in subfunctions being lower than the cumtime in a parent function, and the obvious answer is, the time was spent in the function itself.
However, for me, it is the other way round: The way I am interpreting these results, the total time spent in subfunctions is larger than the cumultative time spent in the parent and subfunctions. Obviously, this cannot really be the case - So I am either misinterpreting the results, or have convoluted code that breaks the cProfile tool? I am not using multiprocessing, or at least, not knowingly (num_cores=1)
See the screenshot below:
I used the following code to get this:
pr = cProfile.Profile()
pr.enable()
test_univariate()
pr.disable()
pr.dump_stats("univariate.stats")
and visualized the results with snakeviz.
Also, the percentage in the function information seems slightly off, as well...
Any idea where to start? Happy to provide more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


