profile — Pure Python profiler — Python 3.16.0a0 documentation

docs.python.org

Table of Contents | Removed Modules | Report a bug | Improve this page | index | modules | Python | 3.16.0a0 Documentation | The Python Standard Library | Superseded modules | getopt — C-style parser for command line options

Tin mới

getopt — C-style parser for command line options

Python Module Index

3.16.0a0 Documentation

The Python Standard Library

Superseded modules

profiling.tracing: Deterministic tracing profiler for Python programs.

Deprecated since version 3.15, will be removed in version 3.17.

profiling.sampling

profiling.sampling for production debugging with zero overhead

Context Manager Types

This class is normally only used if more precise control over profiling is needed than what the profiling.tracing.run() function provides.

pstats.Stats.sort_stats()

Create a Stats object based on the current profile and print the results to stdout.

profile and profiling.tracing module reference¶

Both the profile and profiling.tracing modules provide the following functions:

Differences from profiling.tracing¶

The profile module differs from profiling.tracing in several ways:

time: Time access and conversions.

If you want to change how current time is determined (for example, to force use of wall-clock time or elapsed process time), pass the timing function you want to the Profile class constructor:

profiling: Python profiling tools for performance analysis.

Statistical analysis and formatting for profile data.

1 1