trace |
index |
program/module to trace Python program or function execution
This version is modified from the trace module distributed with Python.
Within Xplor-NIH, the most commonly called functions are suspend() and
resume(), which suspend/resume the echoing of Python commands to stdout.
Sample use, command line:
trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
trace.py -t --ignore-dir '$prefix' spam.py eggs
Sample use, programmatically (still more complicated than it should be)
# create an Ignore option, telling it what you want to ignore
ignore = trace.Ignore(dirs = [sys.prefix, sys.exec_prefix])
# create a Coverage object, telling it what to ignore
coverage = trace.Coverage(ignore)
# run the new command using the given trace
trace.run(coverage.trace, 'main()')
# make a report, telling it where you want output
t = trace.create_results_log(coverage.results(),
'/usr/local/Automatrix/concerts/coverage')
show_missing = 1)
The Trace class can be instantited instead of the Coverage class if
runtime display of executable lines is desired instead of statement
converage measurement.
Classes | ||||||||||||||||||||||||||||||||||
|
Functions | ||
|
Data | ||
currentTrace = 0 savedCnt = 0 savedTrace = None |