projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
10383: Merge branch 'master' into 10383-arv-put-incremental-upload
[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 57030a795b1dc62c9ed851927d858e9970ac1456..afa53ae73c0d2eb5231054889eedbcc3563c202d 100644
(file)
--- a/
sdk/python/tests/performance/performance_profiler.py
+++ b/
sdk/python/tests/performance/performance_profiler.py
@@
-10,13
+10,10
@@
#
# See "test_a_sample.py" for a working example.
#
#
# See "test_a_sample.py" for a working example.
#
-#
To run performance tests:
-#
cd arvados/sdk/python
+#
Performance tests run as part of regular test suite.
+#
You can also run only the performance tests using one of the following:
# python -m unittest discover tests.performance
# python -m unittest discover tests.performance
-#
-# Alternatively, using run-tests.sh
-# ./run-tests.sh WORKSPACE=~/arvados --only sdk/python sdk/python_test="--test-suite=tests.performance"
-#
+# ./run-tests.sh WORKSPACE=~/arvados --only sdk/python sdk/python_test="--test-suite=tests.performance"
import functools
import os
import functools
import os
@@
-41,12
+38,12
@@
def profiled(function):
pr.enable()
try:
ret = function(*args, **kwargs)
pr.enable()
try:
ret = function(*args, **kwargs)
- except e:
+ except
Exception as
e:
caught = e
pr.disable()
ps = pstats.Stats(pr, stream=outfile)
caught = e
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