Skip to main content

simpleprofiler

Tool to profile your code in python

Installation

pip install simpleprofiler

Logging Level

Defaultly simpleprofiler use INFO as logging level

Example

Code:

from simpleprofiler import get_profile

import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)
_logger = logging.getLogger(__name__)

@get_profile
def try_func(bool, arr):
    if bool:
        for item in arr:
            _logger.info(item)
    else:
        for item in arr:
            _logger.info(info)

try_func(True, ["try" * 10])

On Console:

try_func >  calls     ms
try_func >  ------------------------------------ /DIRECTORY_TO/example.py, 8

try_func > 1         0.0       @get_profile
try_func >                     def try_func(bool, arr):
try_func > 1         0.0           if bool:
try_func > 2         0.0               for item in arr:
try_func > 1         0.21                  _logger.info(item)
try_func >                         else:
try_func >                             for item in arr:
try_func >                                 _logger.info(item)

try_func > Total:
try_func > 1         0.21  

Release files for simpleprofiler 0.1.1

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

Source distribution (sdist)

Source distribution for simpleprofiler 0.1.1
File Size Uploaded
simpleprofiler-0.1.1.tar.gz 3.6 kB Details

Release files / simpleprofiler-0.1.1.tar.gz

Download URL simpleprofiler-0.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
81a5888c0a7d5db34bd6f98965761ede4fed75c10c4628ca764d2feb68cab90f
BLAKE2b-256 checksum
How to use checksums
89637458914079ddba066f8a5be29d2eca390fb5346abecb6a1f8bd5e1c73ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

1 release file

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