Skip to main content

simple_profiler

Project description

Install

pip install cprofiler-manager-wrapper

Usage

from cprofiler_manager_wrapper import Profiler


def func_to_profile():
    from time import sleep

    result = []
    for i in range(10):
        result.append(i)
    sleep(1)

    a = 10

    return 'hello world'


with Profiler(func_about_string='func', disable=False):
    func_to_profile()

По итогу будет создана, если ее не было, папка prof_folder, внутри которой будет лежат файл .prof

Для открытия .prof файла используется snakeviz - snakeviz prof_folder/<some>.prof

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

cprofiler_manager_wrapper-0.0.6.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file cprofiler_manager_wrapper-0.0.6.tar.gz.

File metadata

File hashes

Hashes for cprofiler_manager_wrapper-0.0.6.tar.gz
Algorithm Hash digest
SHA256 aaf390c2c274ff2b5853e154d15b5244777da28ac11460d537be05013d2213c1
MD5 1e9a9e7764d2ee5e917e1bb03661c4a4
BLAKE2b-256 df839e57851b8bac243170013371554b3de49cd1cf3e87bfcea30013e95d4c70

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