Skip to main content

microperf

PyPI downloads

microperf is a perf wrapper. The basic idea is that it converts a perf.data file by inserting all samples into a database, making it then easier to query for specific patterns or code smells.

Usage

Generating a profile

First, note that your executable should be compiled with debug symbols (-g, -DCMAKE_BUILD_TYPE=RelWithDebInfo, ...).

Since microperf is simply a wrapper, generating a profile can be done directly with perf.

perf record -F99 --call-graph=dwarf -- <COMMAND>

Alternatively, microperf perf provides a convenience passthrough to perf. This can be useful when a different perf executable should be used (see MICROPERF_PERF_EXE option below).

Running the Patterns analyzer

I've written a couple queries to identify common bad patterns. At time of this writing, this includes cycles spent in:

  1. tree-based structures (std::map, std::set): these can often be replaced with hash-based data structures.
  2. constructors: these are often signs of excessive copying.

Options

The environment variable MICROPERF_PERF_EXE can be set to the path of a perf executable to be used instead of the default perf command.

Metadata

Release files for microperf 1.0.2

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

Source distribution (sdist)

Source distribution for microperf 1.0.2
File Size Uploaded
microperf-1.0.2.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for microperf 1.0.2
File Interpreter ABI Platform
microperf-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / microperf-1.0.2.tar.gz

Download URL microperf-1.0.2.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47c7362dc5844043040243849752d6e59711c916836234b4503109bba9ff868f
BLAKE2b-256 checksum
How to use checksums
4ce2335d31a82350bfef02663454b042a399e641c7b48402536f33c3a97abcb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Release files / microperf-1.0.2-py3-none-any.whl

Download URL microperf-1.0.2-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
071688f242bbd6b573bdbe654a1b120b0a210fa95c6f4ffbe1035d9ce2ec1636
BLAKE2b-256 checksum
How to use checksums
53f11ff8ecd82b96686bc8d74e6c0934a82c0aedef35160029eff2b00ad1d925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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