Skip to main content

Import profiler to find bottlenecks in import times.

Project description

# import-profiler
A basic python import profiler to find bottlenecks in import times. While not
often a problem, imports can be an issue for applications that need to start
quickly, such as CLI tools. The goal of import profiler is to help find the
bottlenecks when importing a given package.

## Example

This is Work in Progress. To try it out, write something as follows:

``` python
from import_profiler import profile_import

with profile_import as context:
# Anything expensive in here
import requests

# Print cumulative and inline times. The number of + in the 3rd column
# indicates the depth of the stack.

# Missing features

We don't track where imports happen: it would be nice to know where a given
import in the profile output happens.

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

import_profiler-0.0.2.tar.gz (1.3 kB view hashes)

Uploaded source

Built Distribution

import_profiler-0.0.2-py2.py3-none-any.whl (2.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page