Trace Python code with the Google Perfetto tracing library
Project description
Perfnetto
Perfnetto wraps the Perfetto tracing SDK to make it possible to trace Python code.
[!NOTE]
This is a very new project and certainly rough around the edges. Please report any issues you find – I hope it's useful in any case.
Installation
From PyPI
Prebuilt binary wheels are available for Linux and macOS for recent versions of Python on PyPI,
so you can use pip or uv pip to install it.
Building from source
Source packages are not available on PyPI (so pip install perfnetto won't work out of the box)
because of the submodule dependency on the Perfetto SDK.
Usage
The high-level API is the with perfnetto.tracing() as ctx: context manager.
Code run within this block is traced into a perfnetto-(TIME).dump file, unless you specify another name.
Perfnetto will log the name of the output file onto the standard Python logger as it finishes.
When tracing, you can use with perfnetto.region(name): to mark a region.
You can also set instant marks with perfnetto.instant(name).
Once you have a dump file, view it with ui.perfetto.dev.
License
Since the majority of this code is a wrapper around the Perfetto library, it is licensed under the same license.
This project is licensed under the Apache License, Version 2.0.
See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 perfnetto-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: perfnetto-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8681e0db76b0c63b7e0675fb9dd49920f5e496f0f99619b66ad1617e06981e9
|
|
| MD5 |
714f19f5e68ff96d89572e5764eb7f4c
|
|
| BLAKE2b-256 |
9f411cb2a63c5490e753467b2b1eb400006f09c72a918d992326b950cc904a32
|
Provenance
The following attestation bundles were made for perfnetto-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
ci.yml on akx/perfnetto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perfnetto-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
d8681e0db76b0c63b7e0675fb9dd49920f5e496f0f99619b66ad1617e06981e9 - Sigstore transparency entry: 146476786
- Sigstore integration time:
-
Permalink:
akx/perfnetto@d097baf69be994855890290f25b4bfe10494fbf9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/akx
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d097baf69be994855890290f25b4bfe10494fbf9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file perfnetto-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: perfnetto-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
292acd2815a55e109e84b0662b81d9a7109646a6d5991e5e213d62130e5e90c1
|
|
| MD5 |
4ff1de52af6b71eb047a97581319e41c
|
|
| BLAKE2b-256 |
e30b877eb6c3b822b9303aadbb0c8c11e37a2c41d2bc680c25dda67470df0be1
|
Provenance
The following attestation bundles were made for perfnetto-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
ci.yml on akx/perfnetto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perfnetto-0.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
292acd2815a55e109e84b0662b81d9a7109646a6d5991e5e213d62130e5e90c1 - Sigstore transparency entry: 146476782
- Sigstore integration time:
-
Permalink:
akx/perfnetto@d097baf69be994855890290f25b4bfe10494fbf9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/akx
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d097baf69be994855890290f25b4bfe10494fbf9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file perfnetto-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: perfnetto-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c841ac3df9344fdb5468bd4bfe71226646f43ef7d5b4e9494e4623eedcaa9fae
|
|
| MD5 |
02b95fa5c09e529889bbd7253c38bde2
|
|
| BLAKE2b-256 |
5bf7885dc11345f12acf4436c9c9ec7b9eec01a12f66e852bb4d6381f12a7571
|
Provenance
The following attestation bundles were made for perfnetto-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
ci.yml on akx/perfnetto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perfnetto-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
c841ac3df9344fdb5468bd4bfe71226646f43ef7d5b4e9494e4623eedcaa9fae - Sigstore transparency entry: 146476783
- Sigstore integration time:
-
Permalink:
akx/perfnetto@d097baf69be994855890290f25b4bfe10494fbf9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/akx
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@d097baf69be994855890290f25b4bfe10494fbf9 -
Trigger Event:
push
-
Statement type: