Skip to main content

No project description provided

Project description

# pprofile_ext
IPython extension for the pprofile line-profiler. The extension allows a user to mark a line or cell
of an IPython notebook and run the [pprofile](https://github.com/vpelletier/pprofile) performance profiler
on the marked section of code. The result of the profile run will be written to HTML and can be viewed in
any browser. If the extension is used from within an IPython notebook then the results are displayed inline
in the notebook.

## Installation

The `pprofile_ext` ipython extension canbe installed using pip:

```bash
pip install pprofile_ext
```

## Usage
To load the extension from the IPython REPL or in a notebook cell type and execute

```python
%load_ext pprofile_ext
```

To view the pprofile_ext help type `%pprofile?`, which will display

<pre>
%pprofile [-n NAME] [-w WIDTH] [-h HEIGHT] [code [code ...]]

PProfile IPython extension

positional arguments:
code

optional arguments:
-n NAME, --name NAME Name of the directory relative to the current notebook
in which to store the profile output and the html
version of the profile output; If the directory does
not exist it will be created. If the directory does
exist a new directory will be created that has a
running integer suffix _x. The default name is
pprofile_output.
-w WIDTH, --width WIDTH
Width in pixels of the iframe displaying the pprofile
output; default 980 (used only in cell mode)
-h HEIGHT, --height HEIGHT
Height in pixels of the iframe displaying the pprofile
output; default 400 (used only in cell mode)
</pre>

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

pprofile_ext-1.0.2.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

pprofile_ext-1.0.2-py2-none-any.whl (15.2 kB view hashes)

Uploaded Python 2

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