forked from OSchip/llvm-project
Added special logic to faciliate profiling the test suite run with the cProfile.py
module. On my MBP running SnowLeopard: $ DOTEST_PROFILE=YES DOTEST_SCRIPT_DIR=/Volumes/data/lldb/svn/trunk/test /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/cProfile.py -o my.profile ./dotest.py -v -w 2> ~/Developer/Log/lldbtest.log After that, I used the pstats.py module to browse the statistics recorded in the my.profile file. llvm-svn: 123807
This commit is contained in:
parent
cf7f74e31c
commit
30775d0107
|
@ -90,3 +90,12 @@ o dotest.pl
|
|||
suite become more reliable, we don't expect to be using 'dotest.pl' anymore.
|
||||
|
||||
Note: dotest.pl has been moved to the attic directory.
|
||||
|
||||
o Profiling dotest.py runs
|
||||
|
||||
I used the following command line thingy to do the profiling on a SnowLeopard
|
||||
machine:
|
||||
|
||||
$ DOTEST_PROFILE=YES DOTEST_SCRIPT_DIR=/Volumes/data/lldb/svn/trunk/test /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/cProfile.py -o my.profile ./dotest.py -v -w 2> ~/Developer/Log/lldbtest.log
|
||||
|
||||
After that, I used the pstats.py module to browse the statistics.
|
||||
|
|
|
@ -439,6 +439,9 @@ def setupSysPath():
|
|||
global testdirs
|
||||
|
||||
# Get the directory containing the current script.
|
||||
if "DOTEST_PROFILE" in os.environ and "DOTEST_SCRIPT_DIR" in os.environ:
|
||||
scriptPath = os.environ["DOTEST_SCRIPT_DIR"]
|
||||
else:
|
||||
scriptPath = sys.path[0]
|
||||
if not scriptPath.endswith('test'):
|
||||
print "This script expects to reside in lldb's test directory."
|
||||
|
|
Loading…
Reference in New Issue