Skip to main content

simple_profiler

Project description

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.3.tar.gz (2.2 kB view hashes)

Uploaded Source

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