Profiler#
- class ivy.utils.profiler.Profiler(*args, **kwargs)[source]#
Bases:
Profile
A Profiler class that allows code profiling.
- print_stats(bool, optional)#
- Type:
prints profiling statistics.
- viz(bool, optional)#
- Type:
visualizes the results using snakeviz.
- Bonus args and kwargs are passed to cProfile.Profile __init__
Example
- with Profiler(print_stats=False, viz=True):
fn(x, y)