Skip to main content

Easy profiler for python functions

Project description

Pyprofiler

Installation

Install from pypi

Install from repo

In virtual environment, install the package from this directory with: pip install .

Usage

Setup

Create a python module that contains a class which inherits from pyprofiler.profiler.PyProfiler.

Create methods that start with profile_.

The functions you want to profile in each method should be sent to self.pyprofile (with additional arguments). self.pyprofile takes a lambda/function/callable and arguments, and performs profiling on it.

usage: pyprofiler [-h] {compare,profile}

Run profiler

Run profiler (and show change in percentage from previous run)

pyprofiler profile [-h] [-n NAME_OF_RUN] [-v] pyprofile_file

Compare runs

Compare a run to a different run.

pyprofiler compare [-h] profile_run_name_before profile_run_name_after

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

simple_pyprofiler-2024.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

simple_pyprofiler-2024.0.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file simple_pyprofiler-2024.0.0.tar.gz.

File metadata

  • Download URL: simple_pyprofiler-2024.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for simple_pyprofiler-2024.0.0.tar.gz
Algorithm Hash digest
SHA256 1054164c823b97ae7af4b02cbb7ac209bd25686ae5d05552510321dbbbc9e2d2
MD5 9b223fd464a517916f7093d17939678e
BLAKE2b-256 90aeda6e3e566b7648cc07a417e10b7fdbd4e71bbc1b9aff23cfd504f12b3203

See more details on using hashes here.

File details

Details for the file simple_pyprofiler-2024.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_pyprofiler-2024.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c222d6d41b4fd3b356d7939089c193bbb1c1b6a00b752a8a2c7901f5afffc81e
MD5 ff8a52f6cc21fafaefca36923d512c27
BLAKE2b-256 e781a616dd40bd7fe017f53ae10a9ff3dea6c14a239609a4f7bb8a22fcc10379

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page