projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
6473: remove incorrect format tests; it appears that #6451 strikes after one such...
[arvados.git]
/
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 7f0766e3ef38fe95e7c7b9e6e9d3ef258fa2de4c..afa53ae73c0d2eb5231054889eedbcc3563c202d 100644
(file)
--- 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)
pr.enable()
try:
ret = function(*args, **kwargs)
- except:
- caught =
sys.exc_info()[0]
+ except
Exception as e
:
+ caught =
e
pr.disable()
ps = pstats.Stats(pr, stream=outfile)
pr.disable()
ps = pstats.Stats(pr, stream=outfile)
- ps.print_stats()
+ ps.
sort_stats('time').
print_stats()
if caught:
if caught:
- raise
caught
+ raise
return ret
return profiled_function
return ret
return profiled_function