Skip to main content

dm.profile

“profile.Profile” improvement

I started the implementation of this module in order to improve the profiler’s calibration using statistical methods. Unfortunately, variance proved to be far too high and my calibration trials did not converge even for large sample sets. I had to abandon this approach.

The code is still there (in case anyone would like to look what I have tried) but I do not use it.

“pstats.Stats” improvement

Beside the profiler’s not so good calibration, I was not satisfied with “pstats” format especially for the caller and callee analysis and with its insistence to write to “stdout”.

Therefore, I derived a new class Stats from pstats.Stats and added new methods showStats, showCallers and showCallees which correspond to print_stats, print_callers and print_callees. They write to a file set with setOutputFile (default sys.stdout) and use a different output format. For showCallers and showCallees it is much more readable than the format used by print_callers and print_callees. I am not sure that this is also the case for the format used for showStats versus print_stats.

When you are using “Stats.print_callers” or “Stats.print_callees” and find their output unreadable, then a switch to “dm.profile.Stats” may be profitable for you.

The method showHeader outputs header information (with involved files, top level functions, number of calls and profiled time).

Metadata

Release files for dm.profile 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dm.profile 1.0
File Size Uploaded
dm.profile-1.0.tar.gz 5.8 kB Details

Release files / dm.profile-1.0.tar.gz

Download URL dm.profile-1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
78679a396e864ba02975e8014c6807718663ba511fa1d96c19714ce89f6e7656
BLAKE2b-256 checksum
How to use checksums
c237b309ea83d6eb8415e349adf5dde102a94ec326818f7c03fef28d7fbb0e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page