Read line profiler reports into Polars DataFrames
Project description
polars-lprof
Read line_profiler reports into Polars DataFrames
Installation
The polars-lprof package can be installed with either polars or polars-lts-cpu using the extras
by those names:
pip install polars-lprof[polars]
pip install polars-lprof[polars-lts-cpu]
If Polars is already installed, you can simply pip install polars-lprof.
Usage
Note: use this tool after running Python code with
@line_profiler.profiledecorators on functions which will output.txtplain text reports on the program's performance. Theline_profilertool relies on the environment variable set withexport LINE_PROFILE=1.
First run your line_profiler (in whichever variations you want) and then use this tool to analyse
the performance reports (named like profile_output_2025-02-04T002856.txt). The most recent one
will always be called profile_output.txt but often we want to collect multiple for review.
plprof profile_output.txt
Use it from Python as a library:
from plprof import parse_lprof
metadata, lines = parse_lprof("profile_output.txt")
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 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 polars_lprof-0.1.0.tar.gz.
File metadata
- Download URL: polars_lprof-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.22.3 CPython/3.10.6 Linux/5.15.0-125-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0310b9b8fd78067ce4fafa8084b20a329b9087fce7e12cd6842dd3a3f364bd7
|
|
| MD5 |
764ce93af40c459242127872e3ec0ea9
|
|
| BLAKE2b-256 |
9eab4b80052e3a949831e92e31a897ca14616e44f17d180840c4773fc8a228e8
|
File details
Details for the file polars_lprof-0.1.0-py3-none-any.whl.
File metadata
- Download URL: polars_lprof-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.22.3 CPython/3.10.6 Linux/5.15.0-125-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
019c9a0422fddfd4a26f0cb9f38cd1806e6d9996dbf2b37b8de13f51d3662318
|
|
| MD5 |
868819dc23e3c52e5eb9df1595055928
|
|
| BLAKE2b-256 |
62035b0635d66dbad888c65f40385b29a0fecbe7a2c9178c09defdd4f7b3a8f8
|