X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/eac37febf548d1d103661ded6e1a0e21e64ba7cd..d3313e652e392b1c0067bcddd65903ed0af19b44:/sdk/python/tests/performance/performance_profiler.py diff --git a/sdk/python/tests/performance/performance_profiler.py b/sdk/python/tests/performance/performance_profiler.py index 484361022c..afa53ae73c 100644 --- a/sdk/python/tests/performance/performance_profiler.py +++ b/sdk/python/tests/performance/performance_profiler.py @@ -38,12 +38,12 @@ def profiled(function): pr.enable() try: ret = function(*args, **kwargs) - except e: + except Exception as e: caught = e pr.disable() ps = pstats.Stats(pr, stream=outfile) - ps.print_stats() + ps.sort_stats('time').print_stats() if caught: - raise caught + raise return ret return profiled_function