A small tool using perf to provide more performance insights.
Project description
microperf
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:
- tree-based structures (
std::map,std::set): these can often be replaced with hash-based data structures. - 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microperf-1.0.2.tar.gz.
File metadata
- Download URL: microperf-1.0.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47c7362dc5844043040243849752d6e59711c916836234b4503109bba9ff868f
|
|
| MD5 |
1b6d7a4e767016bac92d9f29d8baaef1
|
|
| BLAKE2b-256 |
4ce2335d31a82350bfef02663454b042a399e641c7b48402536f33c3a97abcb4
|
Provenance
The following attestation bundles were made for microperf-1.0.2.tar.gz:
Publisher:
release.yml on nicovank/microperf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
microperf-1.0.2.tar.gz -
Subject digest:
47c7362dc5844043040243849752d6e59711c916836234b4503109bba9ff868f - Sigstore transparency entry: 974859337
- Sigstore integration time:
-
Permalink:
nicovank/microperf@76c1164e8392a576e8cefb991dbd5bdf16d49bd8 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nicovank
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@76c1164e8392a576e8cefb991dbd5bdf16d49bd8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file microperf-1.0.2-py3-none-any.whl.
File metadata
- Download URL: microperf-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071688f242bbd6b573bdbe654a1b120b0a210fa95c6f4ffbe1035d9ce2ec1636
|
|
| MD5 |
447936115c12fa459f93c0c81e2e0e35
|
|
| BLAKE2b-256 |
53f11ff8ecd82b96686bc8d74e6c0934a82c0aedef35160029eff2b00ad1d925
|
Provenance
The following attestation bundles were made for microperf-1.0.2-py3-none-any.whl:
Publisher:
release.yml on nicovank/microperf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
microperf-1.0.2-py3-none-any.whl -
Subject digest:
071688f242bbd6b573bdbe654a1b120b0a210fa95c6f4ffbe1035d9ce2ec1636 - Sigstore transparency entry: 974859344
- Sigstore integration time:
-
Permalink:
nicovank/microperf@76c1164e8392a576e8cefb991dbd5bdf16d49bd8 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nicovank
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@76c1164e8392a576e8cefb991dbd5bdf16d49bd8 -
Trigger Event:
release
-
Statement type: