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.
context.print_info()
```

# 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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file import_profiler-0.0.2.tar.gz.

File metadata

File hashes

Hashes for import_profiler-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2a95b030dfb7a867e07890a3d8a6d24ef5c5cde626d30f6b1107eee6a2590dfe
MD5 f25e5269c652e2486da41d6d6f96e2d3
BLAKE2b-256 6940d85ab5bdf06815431339d1be0bfac71673b2d6c5d0f10dac7cc9f952889c

See more details on using hashes here.

File details

Details for the file import_profiler-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for import_profiler-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b369524c576fa8f769499dff1d3f99d982d69fd8fb73d9447513f8e5ed0135d
MD5 eea22badc329f6b951ad4c37e421c13c
BLAKE2b-256 ae923bb5afa584e05b7001180fe93a38ca3b6345260d273a70b607c474379209

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