Skip to content

Instantly share code, notes, and snippets.

@rtlee9
Created October 23, 2022 04:40
Show Gist options
  • Select an option

  • Save rtlee9/ca34f6693312c3f5122753b703cf2c2f to your computer and use it in GitHub Desktop.

Select an option

Save rtlee9/ca34f6693312c3f5122753b703cf2c2f to your computer and use it in GitHub Desktop.
In [17]: slow.strip_dirs().sort_stats(SortKey.CUMULATIVE).print_stats('to_native_types')
Tue Oct 11 21:18:38 2022 profiler_stats_fast
7122434 function calls (7002287 primitive calls) in 2.686 seconds
Ordered by: cumulative time
List reduced from 419 to 3 due to restriction <'to_native_types'>
ncalls tottime percall cumtime percall filename:lineno(function)
10 0.000 0.000 2.230 0.223 managers.py:498(to_native_types)
10000 0.011 0.000 2.203 0.000 blocks.py:542(to_native_types)
10000 0.041 0.000 2.107 0.000 blocks.py:2273(to_native_types)
Out[17]: <pstats.Stats at 0x10f7cfc70>
In [18]: fast.strip_dirs().sort_stats(SortKey.CUMULATIVE).print_stats('to_native_types')
Tue Oct 11 21:18:39 2022 profiler_stats_slow
155947 function calls (154847 primitive calls) in 0.175 seconds
Ordered by: cumulative time
List reduced from 459 to 3 due to restriction <'to_native_types'>
ncalls tottime percall cumtime percall filename:lineno(function)
10 0.000 0.000 0.009 0.001 managers.py:498(to_native_types)
10 0.000 0.000 0.009 0.001 blocks.py:542(to_native_types)
10 0.000 0.000 0.009 0.001 blocks.py:2273(to_native_types)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment