§
ýEÕ¡wy×7ã ó — d Z ddgZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
mZ ddlZdZ G d„ d¦ « Zd „ Zd
„ Z G d„ d¦ « Zd„ Zd
„ Zdd„Zd„ Z G d„ d¦ « Zd„ Zedk r e¦ « dS dS )a· program/module to trace Python program or function execution
Sample use, command line:
trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
trace.py -t --ignore-dir '$prefix' spam.py eggs
trace.py --trackcalls spam.py eggs
Sample use, programmatically
import sys
# create a Trace object, telling it what to ignore, and whether to
# do tracing or line-counting or both.
tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,],
trace=0, count=1)
# run the new command using the given tracer
tracer.run('main()')
# make a report, placing output in /tmp
r = tracer.results()
r.write_results(show_missing=True, coverdir="/tmp")
ÚTraceÚCoverageResultsé N)Ú monotonicz#pragma NO COVERc ó — e Zd Zdd„Zd„ ZdS )Ú_IgnoreNc óŠ — |st ¦ « nt |¦ « | _ |sg nd„ |D ¦ « | _ ddi| _ d S )Nc óL — g | ]!}t j |¦ « ‘Œ"S © )ÚosÚpathÚnormpath©Ú.0Úds ú2/opt/alt/python-internal/lib64/python3.11/trace.pyú