scalene


Namescalene JSON
Version 1.5.39 PyPI version JSON
download
home_pagehttps://github.com/plasma-umass/scalene
SummaryScalene: A high-resolution, low-overhead CPU, GPU, and memory profiler for Python with AI-powered optimization suggestions
upload_time2024-04-15 20:52:34
maintainerNone
docs_urlNone
authorEmery Berger
requires_python!=3.11.0,>=3.8
licenseApache License 2.0
keywords performance memory profiler
VCS
bugtrack_url
requirements astunparse cloudpickle Cython crdp ipython Jinja2 lxml packaging psutil pyperf rich setuptools pynvml wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![scalene](https://github.com/plasma-umass/scalene/raw/master/docs/scalene-icon-white.png)

# Scalene: a Python CPU+GPU+memory profiler with AI-powered optimization proposals

by [Emery Berger](https://emeryberger.com), [Sam Stern](https://samstern.me/), and [Juan Altmayer Pizzorno](https://github.com/jaltmayerpizzorno).

[![Scalene community Slack](https://github.com/plasma-umass/scalene/raw/master/docs/images/slack-logo.png)](https://join.slack.com/t/scaleneprofil-jge3234/shared_invite/zt-110vzrdck-xJh5d4gHnp5vKXIjYD3Uwg)[Scalene community Slack](https://join.slack.com/t/scaleneprofil-jge3234/shared_invite/zt-110vzrdck-xJh5d4gHnp5vKXIjYD3Uwg)

[![PyPI Latest Release](https://img.shields.io/pypi/v/scalene.svg)](https://pypi.org/project/scalene/)[![Anaconda-Server Badge](https://img.shields.io/conda/v/conda-forge/scalene)](https://anaconda.org/conda-forge/scalene) [![Downloads](https://static.pepy.tech/badge/scalene)](https://pepy.tech/project/scalene)[![Anaconda downloads](https://img.shields.io/conda/d/conda-forge/scalene?logo=conda)](https://anaconda.org/conda-forge/scalene) [![Downloads](https://static.pepy.tech/badge/scalene/month)](https://pepy.tech/project/scalene) ![Python versions](https://img.shields.io/pypi/pyversions/scalene.svg?style=flat-square)[![Visual Studio Code Extension version](https://img.shields.io/visual-studio-marketplace/v/emeryberger.scalene?logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=EmeryBerger.scalene) ![License](https://img.shields.io/github/license/plasma-umass/scalene)

![Ozsvald tweet](https://github.com/plasma-umass/scalene/raw/master/docs/Ozsvald-tweet.png)

(tweet from Ian Ozsvald, author of [_High Performance Python_](https://smile.amazon.com/High-Performance-Python-Performant-Programming/dp/1492055026/ref=sr_1_1?crid=texbooks))

![Semantic Scholar success story](https://github.com/plasma-umass/scalene/raw/master/docs/semantic-scholar-success.png)

***Scalene web-based user interface:*** [http://plasma-umass.org/scalene-gui/](http://plasma-umass.org/scalene-gui/)
 
## About Scalene

Scalene is a high-performance CPU, GPU *and* memory profiler for
Python that does a number of things that other Python profilers do not
and cannot do.  It runs orders of magnitude faster than many other
profilers while delivering far more detailed information. It is also
the first profiler ever to incorporate AI-powered proposed
optimizations.

### AI-powered optimization suggestions

> **Note**
>
> To enable AI-powered optimization suggestions, you need to enter an [OpenAI key](https://openai.com/api/) in the box under "Advanced options". _Your account will need to have a positive balance for this to work_ (check your balance at https://platform.openai.com/account/usage).
>
> <img width="487" alt="Scalene advanced options" src="https://user-images.githubusercontent.com/1612723/211639253-ec926b38-3efe-4a20-8514-e10dde94ec01.png">

Once you've entered your OpenAI key (see above), click on the lightning bolt (⚡) beside any line or the explosion (💥) for an entire region of code to generate a proposed optimization. Click on a proposed optimization to copy it to the clipboard.

<img width="571" alt="example proposed optimization" src="https://user-images.githubusercontent.com/1612723/211639968-37cf793f-3290-43d1-9282-79e579558388.png">

You can click as many times as you like on the lightning bolt or explosion, and it will generate different suggested optimizations. Your mileage may vary, but in some cases, the suggestions are quite impressive (e.g., order-of-magnitude improvements). 
  
### Quick Start

#### Installing Scalene:

```console
python3 -m pip install -U scalene
```

or

```console
conda install -c conda-forge scalene
```

#### Using Scalene:

After installing Scalene, you can use Scalene at the command line, or as a Visual Studio Code extension.

<details>
  <summary>
    Using the Scalene VS Code Extension:
  </summary>
  

First, install <a href="https://marketplace.visualstudio.com/items?itemName=EmeryBerger.scalene">the Scalene extension from the VS Code Marketplace</a> or by searching for it within VS Code by typing Command-Shift-X (Mac) or Ctrl-Shift-X (Windows). Once that's installed, click Command-Shift-P or Ctrl-Shift-P to open the <a href="https://code.visualstudio.com/docs/getstarted/userinterface">Command Palette</a>. Then select <b>"Scalene: AI-powered profiling..."</b> (you can start typing Scalene and it will pop up if it's installed). Run that and, assuming your code runs for at least a second, a Scalene profile will appear in a webview.
  
<img width="734" alt="Screenshot 2023-09-20 at 7 09 06 PM" src="https://github.com/plasma-umass/scalene/assets/1612723/7e78e3d2-e649-4f02-86fd-0da2a259a1a4">

</details>

<details>
<summary>
Commonly used command-line options:
</summary>

```console
scalene your_prog.py                             # full profile (outputs to web interface)
python3 -m scalene your_prog.py                  # equivalent alternative

scalene --cli your_prog.py                       # use the command-line only (no web interface)

scalene --cpu your_prog.py                       # only profile CPU
scalene --cpu --gpu your_prog.py                 # only profile CPU and GPU
scalene --cpu --gpu --memory your_prog.py        # profile everything (same as no options)

scalene --reduced-profile your_prog.py           # only profile lines with significant usage
scalene --profile-interval 5.0 your_prog.py      # output a new profile every five seconds

scalene (Scalene options) --- your_prog.py (...) # use --- to tell Scalene to ignore options after that point
scalene --help                                   # lists all options
```

</details>

<details>
<summary>
Using Scalene programmatically in your code:
</summary>

Invoke using `scalene` as above and then:

```Python
from scalene import scalene_profiler

# Turn profiling on
scalene_profiler.start()

# Turn profiling off
scalene_profiler.stop()
```

</details>

<details>
<summary>
Using Scalene to profile only specific functions via <code>@profile</code>:
</summary>

Just preface any functions you want to profile with the `@profile` decorator and run it with Scalene:

```Python
# do not import profile!

@profile
def slow_function():
    import time
    time.sleep(3)
```

</details>

#### Web-based GUI

Scalene has both a CLI and a web-based GUI [(demo here)](http://plasma-umass.org/scalene-gui/).

By default, once Scalene has profiled your program, it will open a
tab in a web browser with an interactive user interface (all processing is done
locally). Hover over bars to see breakdowns of CPU and memory
consumption, and click on underlined column headers to sort the
columns. The generated file `profile.html` is self-contained and can be saved for later use.

[![Scalene web GUI](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/scalene-gui-example.png)](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/scalene-gui-example-full.png)


## Scalene Overview

### Scalene talk (PyCon US 2021)

[This talk](https://youtu.be/5iEf-_7mM1k) presented at PyCon 2021 walks through Scalene's advantages and how to use it to debug the performance of an application (and provides some technical details on its internals). We highly recommend watching this video!

[![Scalene presentation at PyCon 2021](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/scalene-video-img.png)](https://youtu.be/5iEf-_7mM1k "Scalene presentation at PyCon 2021")

### Fast and Accurate

- Scalene is **_fast_**. It uses sampling instead of instrumentation or relying on Python's tracing facilities. Its overhead is typically no more than 10-20% (and often less).

- Scalene is **accurate**. We tested CPU profiler accuracy and found that Scalene is among the most accurate profilers, correctly measuring time taken.

![Profiler accuracy](https://github.com/plasma-umass/scalene/raw/master/docs/cpu-accuracy-comparison.png)

- Scalene performs profiling **_at the line level_** _and_ **_per function_**, pointing to the functions and the specific lines of code responsible for the execution time in your program.

### CPU profiling

- Scalene **separates out time spent in Python from time in native code** (including libraries). Most Python programmers aren't going to optimize the performance of native code (which is usually either in the Python implementation or external libraries), so this helps developers focus their optimization efforts on the code they can actually improve.
- Scalene **highlights hotspots** (code accounting for significant percentages of CPU time or memory allocation) in red, making them even easier to spot.
- Scalene also separates out **system time**, making it easy to find I/O bottlenecks.

### GPU profiling

- Scalene reports **GPU time** (currently limited to NVIDIA-based systems).

### Memory profiling

- Scalene **profiles memory usage**. In addition to tracking CPU usage, Scalene also points to the specific lines of code responsible for memory growth. It accomplishes this via an included specialized memory allocator.
- Scalene separates out the percentage of **memory consumed by Python code vs. native code**.
- Scalene produces **_per-line_ memory profiles**.
- Scalene **identifies lines with likely memory leaks**.
- Scalene **profiles _copying volume_**, making it easy to spot inadvertent copying, especially due to crossing Python/library boundaries (e.g., accidentally converting `numpy` arrays into Python arrays, and vice versa).

### Other features

- Scalene can produce **reduced profiles** (via `--reduced-profile`) that only report lines that consume more than 1% of CPU or perform at least 100 allocations.
- Scalene supports `@profile` decorators to profile only specific functions.
- When Scalene is profiling a program launched in the background (via `&`), you can **suspend and resume profiling**.

# Comparison to Other Profilers

## Performance and Features

Below is a table comparing the **performance and features** of various profilers to Scalene.

![Performance and feature comparison](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/profiler-comparison.png)

- **Slowdown**: the slowdown when running a benchmark from the Pyperformance suite. Green means less than 2x overhead. Scalene's overhead is just a 35% slowdown.

Scalene has all of the following features, many of which only Scalene supports:

- **Lines or functions**: does the profiler report information only for entire functions, or for every line -- Scalene does both.
- **Unmodified Code**: works on unmodified code.
- **Threads**: supports Python threads.
- **Multiprocessing**: supports use of the `multiprocessing` library -- _Scalene only_
- **Python vs. C time**: breaks out time spent in Python vs. native code (e.g., libraries) -- _Scalene only_
- **System time**: breaks out system time (e.g., sleeping or performing I/O) -- _Scalene only_
- **Profiles memory**: reports memory consumption per line / function
- **GPU**: reports time spent on an NVIDIA GPU (if present) -- _Scalene only_
- **Memory trends**: reports memory use over time per line / function -- _Scalene only_
- **Copy volume**: reports megabytes being copied per second -- _Scalene only_
- **Detects leaks**: automatically pinpoints lines responsible for likely memory leaks -- _Scalene only_

## Output

If you include the `--cli` option, Scalene prints annotated source code for the program being profiled
(as text, JSON (`--json`), or HTML (`--html`)) and any modules it
uses in the same directory or subdirectories (you can optionally have
it `--profile-all` and only include files with at least a
`--cpu-percent-threshold` of time).  Here is a snippet from
`pystone.py`.

![Example profile](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/sample-profile-pystone.png)

* **Memory usage at the top**: Visualized by "sparklines", memory consumption over the runtime of the profiled code.
* **"Time Python"**: How much time was spent in Python code.
* **"native"**: How much time was spent in non-Python code (e.g., libraries written in C/C++).
* **"system"**: How much time was spent in the system (e.g., I/O).
* **"GPU"**: (not shown here) How much time spent on the GPU, if your system has an NVIDIA GPU installed.
* **"Memory Python"**: How much of the memory allocation happened on the Python side of the code, as opposed to in non-Python code (e.g., libraries written in C/C++).
* **"net"**: Positive net memory numbers indicate total memory allocation in megabytes; negative net memory numbers indicate memory reclamation.
* **"timeline / %"**: Visualized by "sparklines", memory consumption generated by this line over the program runtime, and the percentages of total memory activity this line represents.
* **"Copy (MB/s)"**: The amount of megabytes being copied per second (see "About Scalene").

##  Scalene

The following command runs Scalene on a provided example program.

```console
scalene test/testme.py
```

<details>
 <summary>
  Click to see all Scalene's options (available by running with <code>--help</code>)
 </summary>

```console
    % scalene --help
     usage: scalene [-h] [--outfile OUTFILE] [--html] [--reduced-profile]
                    [--profile-interval PROFILE_INTERVAL] [--cpu-only]
                    [--profile-all] [--profile-only PROFILE_ONLY]
                    [--use-virtual-time]
                    [--cpu-percent-threshold CPU_PERCENT_THRESHOLD]
                    [--cpu-sampling-rate CPU_SAMPLING_RATE]
                    [--malloc-threshold MALLOC_THRESHOLD]
     
     Scalene: a high-precision CPU and memory profiler.
     https://github.com/plasma-umass/scalene
     
     command-line:
        % scalene [options] yourprogram.py
     or
        % python3 -m scalene [options] yourprogram.py
     
     in Jupyter, line mode:
        %scrun [options] statement
     
     in Jupyter, cell mode:
        %%scalene [options]
        code...
        code...
     
     optional arguments:
       -h, --help            show this help message and exit
       --outfile OUTFILE     file to hold profiler output (default: stdout)
       --html                output as HTML (default: text)
       --reduced-profile     generate a reduced profile, with non-zero lines only (default: False)
       --profile-interval PROFILE_INTERVAL
                             output profiles every so many seconds (default: inf)
       --cpu-only            only profile CPU time (default: profile CPU, memory, and copying)
       --profile-all         profile all executed code, not just the target program (default: only the target program)
       --profile-only PROFILE_ONLY
                             profile only code in filenames that contain the given strings, separated by commas (default: no restrictions)
       --use-virtual-time    measure only CPU time, not time spent in I/O or blocking (default: False)
       --cpu-percent-threshold CPU_PERCENT_THRESHOLD
                             only report profiles with at least this percent of CPU time (default: 1%)
       --cpu-sampling-rate CPU_SAMPLING_RATE
                             CPU sampling rate (default: every 0.01s)
       --malloc-threshold MALLOC_THRESHOLD
                             only report profiles with at least this many allocations (default: 100)
     
     When running Scalene in the background, you can suspend/resume profiling
     for the process ID that Scalene reports. For example:
     
        % python3 -m scalene [options] yourprogram.py &
      Scalene now profiling process 12345
        to suspend profiling: python3 -m scalene.profile --off --pid 12345
        to resume profiling:  python3 -m scalene.profile --on  --pid 12345
```
</details>

### Scalene with Jupyter

<details>
<summary>
Instructions for installing and using Scalene with Jupyter notebooks
</summary>

[This notebook](https://nbviewer.jupyter.org/github/plasma-umass/scalene/blob/master/docs/scalene-demo.ipynb) illustrates the use of Scalene in Jupyter.

Installation:

```console
!pip install scalene
%load_ext scalene
```

Line mode:

```console
%scrun [options] statement
```

Cell mode:

```console
%%scalene [options]
code...
code...
```
</details>

## Installation

<details open>
<summary>Using <code>pip</code> (Mac OS X, Linux, Windows, and WSL2)</summary>

Scalene is distributed as a `pip` package and works on Mac OS X, Linux (including Ubuntu in [Windows WSL2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)) and (with limitations) Windows platforms.

> **Note**
>
> The Windows version currently only supports CPU and GPU profiling, but not memory or copy profiling.
> 

You can install it as follows:
```console
  % pip install -U scalene
```

or
```console
  % python3 -m pip install -U scalene
```

You may need to install some packages first.

See https://stackoverflow.com/a/19344978/4954434 for full instructions for all Linux flavors.

For Ubuntu/Debian:

```console
  % sudo apt install git python3-all-dev
```
</details>

<details>
<summary>Using <code>conda</code> (Mac OS X, Linux, Windows, and WSL2)</summary>

```console
  % conda install -c conda-forge scalene
```

Scalene is distributed as a `conda` package and works on Mac OS X, Linux (including Ubuntu in [Windows WSL2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)) and (with limitations) Windows platforms.

> **Note**
>
> The Windows version currently only supports CPU and GPU profiling, but not memory or copy profiling.
> 
</details>

<details>
<summary>On ArchLinux</summary>

You can install Scalene on Arch Linux via the [AUR
package](https://aur.archlinux.org/packages/python-scalene-git/). Use your favorite AUR helper, or
manually download the `PKGBUILD` and run `makepkg -cirs` to build. Note that this will place
`libscalene.so` in `/usr/lib`; modify the below usage instructions accordingly.
</details>

# Frequently Asked Questions

<details>
<summary>
Can I use Scalene with PyTest?
</summary>

**A:** Yes! You can run it as follows (for example):

`python3 -m scalene --- -m pytest your_test.py` 

</details>

<details>
<summary>
Is there any way to get shorter profiles or do more targeted profiling?
</summary>

**A:** Yes! There are several options:

1. Use `--reduced-profile` to include only lines and files with memory/CPU/GPU activity.
2. Use `--profile-only` to include only filenames containing specific strings (as in, `--profile-only foo,bar,baz`).
3. Decorate functions of interest with `@profile` to have Scalene report _only_ those functions.
4. Turn profiling on and off programmatically by importing Scalene (`import scalene`) and then turning profiling on and off via `scalene_profiler.start()` and `scalene_profiler.stop()`. By default, Scalene runs with profiling on, so to delay profiling until desired, use the `--off` command-line option (`python3 -m scalene --off yourprogram.py`).
</details>

<details>
<summary>
How do I run Scalene in PyCharm?
</summary>

**A:**  In PyCharm, you can run Scalene at the command line by opening the terminal at the bottom of the IDE and running a Scalene command (e.g., `python -m scalene <your program>`). Use the options `--cli`, `--html`, and `--outfile <your output.html>` to generate an HTML file that you can then view in the IDE.
</details>

<details>
<summary>
How do I use Scalene with Django?
</summary>

**A:** Pass in the `--noreload` option (see https://github.com/plasma-umass/scalene/issues/178).
</details>


<details>
<summary>
Does Scalene work with gevent/Greenlets?
</summary>

**A:** Yes! Put the following code in the beginning of your program, or modify the call to `monkey.patch_all` as below:

```python
from gevent import monkey
monkey.patch_all(thread=False)
```
</details>



<details>
<summary>
How do I use Scalene with PyTorch on the Mac?
</summary>

**A:** Scalene works with PyTorch version 1.5.1 on Mac OS X. There's a bug in newer versions of PyTorch (https://github.com/pytorch/pytorch/issues/57185) that interferes with Scalene (discussion here: https://github.com/plasma-umass/scalene/issues/110), but only on Macs.
</details>

# Technical Information

For details about how Scalene works, please see the following paper, which won the Jay Lepreau Best Paper Award at [OSDI 2023](https://www.usenix.org/conference/osdi23/presentation/berger): [Triangulating Python Performance Issues with Scalene](https://arxiv.org/pdf/2212.07597). (Note that this paper does not include information about the AI-driven proposed optimizations.)

<details>
<summary>
To cite Scalene in an academic paper, please use the following:
</summary>

```latex
@inproceedings{288540,
author = {Emery D. Berger and Sam Stern and Juan Altmayer Pizzorno},
title = {Triangulating Python Performance Issues with {S}calene},
booktitle = {{17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23)}},
year = {2023},
isbn = {978-1-939133-34-2},
address = {Boston, MA},
pages = {51--64},
url = {https://www.usenix.org/conference/osdi23/presentation/berger},
publisher = {USENIX Association},
month = jul
}
```
</details>


# Success Stories

If you use Scalene to successfully debug a performance problem, please [add a comment to this issue](https://github.com/plasma-umass/scalene/issues/58)!


# Acknowledgements

Logo created by [Sophia Berger](https://www.linkedin.com/in/sophia-berger/).

This material is based upon work supported by the National Science
Foundation under Grant No. 1955610. Any opinions, findings, and
conclusions or recommendations expressed in this material are those of
the author(s) and do not necessarily reflect the views of the National
Science Foundation.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/plasma-umass/scalene",
    "name": "scalene",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=3.11.0,>=3.8",
    "maintainer_email": null,
    "keywords": "performance memory profiler",
    "author": "Emery Berger",
    "author_email": "emery@cs.umass.edu",
    "download_url": "https://files.pythonhosted.org/packages/dc/85/986afd83440d1c408795ee70486a6a246339d8bdfc24cc933abc6ce424dd/scalene-1.5.39.tar.gz",
    "platform": null,
    "description": "![scalene](https://github.com/plasma-umass/scalene/raw/master/docs/scalene-icon-white.png)\n\n# Scalene: a Python CPU+GPU+memory profiler with AI-powered optimization proposals\n\nby [Emery Berger](https://emeryberger.com), [Sam Stern](https://samstern.me/), and [Juan Altmayer Pizzorno](https://github.com/jaltmayerpizzorno).\n\n[![Scalene community Slack](https://github.com/plasma-umass/scalene/raw/master/docs/images/slack-logo.png)](https://join.slack.com/t/scaleneprofil-jge3234/shared_invite/zt-110vzrdck-xJh5d4gHnp5vKXIjYD3Uwg)[Scalene community Slack](https://join.slack.com/t/scaleneprofil-jge3234/shared_invite/zt-110vzrdck-xJh5d4gHnp5vKXIjYD3Uwg)\n\n[![PyPI Latest Release](https://img.shields.io/pypi/v/scalene.svg)](https://pypi.org/project/scalene/)[![Anaconda-Server Badge](https://img.shields.io/conda/v/conda-forge/scalene)](https://anaconda.org/conda-forge/scalene) [![Downloads](https://static.pepy.tech/badge/scalene)](https://pepy.tech/project/scalene)[![Anaconda downloads](https://img.shields.io/conda/d/conda-forge/scalene?logo=conda)](https://anaconda.org/conda-forge/scalene) [![Downloads](https://static.pepy.tech/badge/scalene/month)](https://pepy.tech/project/scalene) ![Python versions](https://img.shields.io/pypi/pyversions/scalene.svg?style=flat-square)[![Visual Studio Code Extension version](https://img.shields.io/visual-studio-marketplace/v/emeryberger.scalene?logo=visualstudiocode)](https://marketplace.visualstudio.com/items?itemName=EmeryBerger.scalene) ![License](https://img.shields.io/github/license/plasma-umass/scalene)\n\n![Ozsvald tweet](https://github.com/plasma-umass/scalene/raw/master/docs/Ozsvald-tweet.png)\n\n(tweet from Ian Ozsvald, author of [_High Performance Python_](https://smile.amazon.com/High-Performance-Python-Performant-Programming/dp/1492055026/ref=sr_1_1?crid=texbooks))\n\n![Semantic Scholar success story](https://github.com/plasma-umass/scalene/raw/master/docs/semantic-scholar-success.png)\n\n***Scalene web-based user interface:*** [http://plasma-umass.org/scalene-gui/](http://plasma-umass.org/scalene-gui/)\n \n## About Scalene\n\nScalene is a high-performance CPU, GPU *and* memory profiler for\nPython that does a number of things that other Python profilers do not\nand cannot do.  It runs orders of magnitude faster than many other\nprofilers while delivering far more detailed information. It is also\nthe first profiler ever to incorporate AI-powered proposed\noptimizations.\n\n### AI-powered optimization suggestions\n\n> **Note**\n>\n> To enable AI-powered optimization suggestions, you need to enter an [OpenAI key](https://openai.com/api/) in the box under \"Advanced options\". _Your account will need to have a positive balance for this to work_ (check your balance at https://platform.openai.com/account/usage).\n>\n> <img width=\"487\" alt=\"Scalene advanced options\" src=\"https://user-images.githubusercontent.com/1612723/211639253-ec926b38-3efe-4a20-8514-e10dde94ec01.png\">\n\nOnce you've entered your OpenAI key (see above), click on the lightning bolt (\u26a1) beside any line or the explosion (\ud83d\udca5) for an entire region of code to generate a proposed optimization. Click on a proposed optimization to copy it to the clipboard.\n\n<img width=\"571\" alt=\"example proposed optimization\" src=\"https://user-images.githubusercontent.com/1612723/211639968-37cf793f-3290-43d1-9282-79e579558388.png\">\n\nYou can click as many times as you like on the lightning bolt or explosion, and it will generate different suggested optimizations. Your mileage may vary, but in some cases, the suggestions are quite impressive (e.g., order-of-magnitude improvements). \n  \n### Quick Start\n\n#### Installing Scalene:\n\n```console\npython3 -m pip install -U scalene\n```\n\nor\n\n```console\nconda install -c conda-forge scalene\n```\n\n#### Using Scalene:\n\nAfter installing Scalene, you can use Scalene at the command line, or as a Visual Studio Code extension.\n\n<details>\n  <summary>\n    Using the Scalene VS Code Extension:\n  </summary>\n  \n\nFirst, install <a href=\"https://marketplace.visualstudio.com/items?itemName=EmeryBerger.scalene\">the Scalene extension from the VS Code Marketplace</a> or by searching for it within VS Code by typing Command-Shift-X (Mac) or Ctrl-Shift-X (Windows). Once that's installed, click Command-Shift-P or Ctrl-Shift-P to open the <a href=\"https://code.visualstudio.com/docs/getstarted/userinterface\">Command Palette</a>. Then select <b>\"Scalene: AI-powered profiling...\"</b> (you can start typing Scalene and it will pop up if it's installed). Run that and, assuming your code runs for at least a second, a Scalene profile will appear in a webview.\n  \n<img width=\"734\" alt=\"Screenshot 2023-09-20 at 7 09 06 PM\" src=\"https://github.com/plasma-umass/scalene/assets/1612723/7e78e3d2-e649-4f02-86fd-0da2a259a1a4\">\n\n</details>\n\n<details>\n<summary>\nCommonly used command-line options:\n</summary>\n\n```console\nscalene your_prog.py                             # full profile (outputs to web interface)\npython3 -m scalene your_prog.py                  # equivalent alternative\n\nscalene --cli your_prog.py                       # use the command-line only (no web interface)\n\nscalene --cpu your_prog.py                       # only profile CPU\nscalene --cpu --gpu your_prog.py                 # only profile CPU and GPU\nscalene --cpu --gpu --memory your_prog.py        # profile everything (same as no options)\n\nscalene --reduced-profile your_prog.py           # only profile lines with significant usage\nscalene --profile-interval 5.0 your_prog.py      # output a new profile every five seconds\n\nscalene (Scalene options) --- your_prog.py (...) # use --- to tell Scalene to ignore options after that point\nscalene --help                                   # lists all options\n```\n\n</details>\n\n<details>\n<summary>\nUsing Scalene programmatically in your code:\n</summary>\n\nInvoke using `scalene` as above and then:\n\n```Python\nfrom scalene import scalene_profiler\n\n# Turn profiling on\nscalene_profiler.start()\n\n# Turn profiling off\nscalene_profiler.stop()\n```\n\n</details>\n\n<details>\n<summary>\nUsing Scalene to profile only specific functions via <code>@profile</code>:\n</summary>\n\nJust preface any functions you want to profile with the `@profile` decorator and run it with Scalene:\n\n```Python\n# do not import profile!\n\n@profile\ndef slow_function():\n    import time\n    time.sleep(3)\n```\n\n</details>\n\n#### Web-based GUI\n\nScalene has both a CLI and a web-based GUI [(demo here)](http://plasma-umass.org/scalene-gui/).\n\nBy default, once Scalene has profiled your program, it will open a\ntab in a web browser with an interactive user interface (all processing is done\nlocally). Hover over bars to see breakdowns of CPU and memory\nconsumption, and click on underlined column headers to sort the\ncolumns. The generated file `profile.html` is self-contained and can be saved for later use.\n\n[![Scalene web GUI](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/scalene-gui-example.png)](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/scalene-gui-example-full.png)\n\n\n## Scalene Overview\n\n### Scalene talk (PyCon US 2021)\n\n[This talk](https://youtu.be/5iEf-_7mM1k) presented at PyCon 2021 walks through Scalene's advantages and how to use it to debug the performance of an application (and provides some technical details on its internals). We highly recommend watching this video!\n\n[![Scalene presentation at PyCon 2021](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/scalene-video-img.png)](https://youtu.be/5iEf-_7mM1k \"Scalene presentation at PyCon 2021\")\n\n### Fast and Accurate\n\n- Scalene is **_fast_**. It uses sampling instead of instrumentation or relying on Python's tracing facilities. Its overhead is typically no more than 10-20% (and often less).\n\n- Scalene is **accurate**. We tested CPU profiler accuracy and found that Scalene is among the most accurate profilers, correctly measuring time taken.\n\n![Profiler accuracy](https://github.com/plasma-umass/scalene/raw/master/docs/cpu-accuracy-comparison.png)\n\n- Scalene performs profiling **_at the line level_** _and_ **_per function_**, pointing to the functions and the specific lines of code responsible for the execution time in your program.\n\n### CPU profiling\n\n- Scalene **separates out time spent in Python from time in native code** (including libraries). Most Python programmers aren't going to optimize the performance of native code (which is usually either in the Python implementation or external libraries), so this helps developers focus their optimization efforts on the code they can actually improve.\n- Scalene **highlights hotspots** (code accounting for significant percentages of CPU time or memory allocation) in red, making them even easier to spot.\n- Scalene also separates out **system time**, making it easy to find I/O bottlenecks.\n\n### GPU profiling\n\n- Scalene reports **GPU time** (currently limited to NVIDIA-based systems).\n\n### Memory profiling\n\n- Scalene **profiles memory usage**. In addition to tracking CPU usage, Scalene also points to the specific lines of code responsible for memory growth. It accomplishes this via an included specialized memory allocator.\n- Scalene separates out the percentage of **memory consumed by Python code vs. native code**.\n- Scalene produces **_per-line_ memory profiles**.\n- Scalene **identifies lines with likely memory leaks**.\n- Scalene **profiles _copying volume_**, making it easy to spot inadvertent copying, especially due to crossing Python/library boundaries (e.g., accidentally converting `numpy` arrays into Python arrays, and vice versa).\n\n### Other features\n\n- Scalene can produce **reduced profiles** (via `--reduced-profile`) that only report lines that consume more than 1% of CPU or perform at least 100 allocations.\n- Scalene supports `@profile` decorators to profile only specific functions.\n- When Scalene is profiling a program launched in the background (via `&`), you can **suspend and resume profiling**.\n\n# Comparison to Other Profilers\n\n## Performance and Features\n\nBelow is a table comparing the **performance and features** of various profilers to Scalene.\n\n![Performance and feature comparison](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/profiler-comparison.png)\n\n- **Slowdown**: the slowdown when running a benchmark from the Pyperformance suite. Green means less than 2x overhead. Scalene's overhead is just a 35% slowdown.\n\nScalene has all of the following features, many of which only Scalene supports:\n\n- **Lines or functions**: does the profiler report information only for entire functions, or for every line -- Scalene does both.\n- **Unmodified Code**: works on unmodified code.\n- **Threads**: supports Python threads.\n- **Multiprocessing**: supports use of the `multiprocessing` library -- _Scalene only_\n- **Python vs. C time**: breaks out time spent in Python vs. native code (e.g., libraries) -- _Scalene only_\n- **System time**: breaks out system time (e.g., sleeping or performing I/O) -- _Scalene only_\n- **Profiles memory**: reports memory consumption per line / function\n- **GPU**: reports time spent on an NVIDIA GPU (if present) -- _Scalene only_\n- **Memory trends**: reports memory use over time per line / function -- _Scalene only_\n- **Copy volume**: reports megabytes being copied per second -- _Scalene only_\n- **Detects leaks**: automatically pinpoints lines responsible for likely memory leaks -- _Scalene only_\n\n## Output\n\nIf you include the `--cli` option, Scalene prints annotated source code for the program being profiled\n(as text, JSON (`--json`), or HTML (`--html`)) and any modules it\nuses in the same directory or subdirectories (you can optionally have\nit `--profile-all` and only include files with at least a\n`--cpu-percent-threshold` of time).  Here is a snippet from\n`pystone.py`.\n\n![Example profile](https://raw.githubusercontent.com/plasma-umass/scalene/master/docs/images/sample-profile-pystone.png)\n\n* **Memory usage at the top**: Visualized by \"sparklines\", memory consumption over the runtime of the profiled code.\n* **\"Time Python\"**: How much time was spent in Python code.\n* **\"native\"**: How much time was spent in non-Python code (e.g., libraries written in C/C++).\n* **\"system\"**: How much time was spent in the system (e.g., I/O).\n* **\"GPU\"**: (not shown here) How much time spent on the GPU, if your system has an NVIDIA GPU installed.\n* **\"Memory Python\"**: How much of the memory allocation happened on the Python side of the code, as opposed to in non-Python code (e.g., libraries written in C/C++).\n* **\"net\"**: Positive net memory numbers indicate total memory allocation in megabytes; negative net memory numbers indicate memory reclamation.\n* **\"timeline / %\"**: Visualized by \"sparklines\", memory consumption generated by this line over the program runtime, and the percentages of total memory activity this line represents.\n* **\"Copy (MB/s)\"**: The amount of megabytes being copied per second (see \"About Scalene\").\n\n##  Scalene\n\nThe following command runs Scalene on a provided example program.\n\n```console\nscalene test/testme.py\n```\n\n<details>\n <summary>\n  Click to see all Scalene's options (available by running with <code>--help</code>)\n </summary>\n\n```console\n    % scalene --help\n     usage: scalene [-h] [--outfile OUTFILE] [--html] [--reduced-profile]\n                    [--profile-interval PROFILE_INTERVAL] [--cpu-only]\n                    [--profile-all] [--profile-only PROFILE_ONLY]\n                    [--use-virtual-time]\n                    [--cpu-percent-threshold CPU_PERCENT_THRESHOLD]\n                    [--cpu-sampling-rate CPU_SAMPLING_RATE]\n                    [--malloc-threshold MALLOC_THRESHOLD]\n     \n     Scalene: a high-precision CPU and memory profiler.\n     https://github.com/plasma-umass/scalene\n     \n     command-line:\n        % scalene [options] yourprogram.py\n     or\n        % python3 -m scalene [options] yourprogram.py\n     \n     in Jupyter, line mode:\n        %scrun [options] statement\n     \n     in Jupyter, cell mode:\n        %%scalene [options]\n        code...\n        code...\n     \n     optional arguments:\n       -h, --help            show this help message and exit\n       --outfile OUTFILE     file to hold profiler output (default: stdout)\n       --html                output as HTML (default: text)\n       --reduced-profile     generate a reduced profile, with non-zero lines only (default: False)\n       --profile-interval PROFILE_INTERVAL\n                             output profiles every so many seconds (default: inf)\n       --cpu-only            only profile CPU time (default: profile CPU, memory, and copying)\n       --profile-all         profile all executed code, not just the target program (default: only the target program)\n       --profile-only PROFILE_ONLY\n                             profile only code in filenames that contain the given strings, separated by commas (default: no restrictions)\n       --use-virtual-time    measure only CPU time, not time spent in I/O or blocking (default: False)\n       --cpu-percent-threshold CPU_PERCENT_THRESHOLD\n                             only report profiles with at least this percent of CPU time (default: 1%)\n       --cpu-sampling-rate CPU_SAMPLING_RATE\n                             CPU sampling rate (default: every 0.01s)\n       --malloc-threshold MALLOC_THRESHOLD\n                             only report profiles with at least this many allocations (default: 100)\n     \n     When running Scalene in the background, you can suspend/resume profiling\n     for the process ID that Scalene reports. For example:\n     \n        % python3 -m scalene [options] yourprogram.py &\n      Scalene now profiling process 12345\n        to suspend profiling: python3 -m scalene.profile --off --pid 12345\n        to resume profiling:  python3 -m scalene.profile --on  --pid 12345\n```\n</details>\n\n### Scalene with Jupyter\n\n<details>\n<summary>\nInstructions for installing and using Scalene with Jupyter notebooks\n</summary>\n\n[This notebook](https://nbviewer.jupyter.org/github/plasma-umass/scalene/blob/master/docs/scalene-demo.ipynb) illustrates the use of Scalene in Jupyter.\n\nInstallation:\n\n```console\n!pip install scalene\n%load_ext scalene\n```\n\nLine mode:\n\n```console\n%scrun [options] statement\n```\n\nCell mode:\n\n```console\n%%scalene [options]\ncode...\ncode...\n```\n</details>\n\n## Installation\n\n<details open>\n<summary>Using <code>pip</code> (Mac OS X, Linux, Windows, and WSL2)</summary>\n\nScalene is distributed as a `pip` package and works on Mac OS X, Linux (including Ubuntu in [Windows WSL2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)) and (with limitations) Windows platforms.\n\n> **Note**\n>\n> The Windows version currently only supports CPU and GPU profiling, but not memory or copy profiling.\n> \n\nYou can install it as follows:\n```console\n  % pip install -U scalene\n```\n\nor\n```console\n  % python3 -m pip install -U scalene\n```\n\nYou may need to install some packages first.\n\nSee https://stackoverflow.com/a/19344978/4954434 for full instructions for all Linux flavors.\n\nFor Ubuntu/Debian:\n\n```console\n  % sudo apt install git python3-all-dev\n```\n</details>\n\n<details>\n<summary>Using <code>conda</code> (Mac OS X, Linux, Windows, and WSL2)</summary>\n\n```console\n  % conda install -c conda-forge scalene\n```\n\nScalene is distributed as a `conda` package and works on Mac OS X, Linux (including Ubuntu in [Windows WSL2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)) and (with limitations) Windows platforms.\n\n> **Note**\n>\n> The Windows version currently only supports CPU and GPU profiling, but not memory or copy profiling.\n> \n</details>\n\n<details>\n<summary>On ArchLinux</summary>\n\nYou can install Scalene on Arch Linux via the [AUR\npackage](https://aur.archlinux.org/packages/python-scalene-git/). Use your favorite AUR helper, or\nmanually download the `PKGBUILD` and run `makepkg -cirs` to build. Note that this will place\n`libscalene.so` in `/usr/lib`; modify the below usage instructions accordingly.\n</details>\n\n# Frequently Asked Questions\n\n<details>\n<summary>\nCan I use Scalene with PyTest?\n</summary>\n\n**A:** Yes! You can run it as follows (for example):\n\n`python3 -m scalene --- -m pytest your_test.py` \n\n</details>\n\n<details>\n<summary>\nIs there any way to get shorter profiles or do more targeted profiling?\n</summary>\n\n**A:** Yes! There are several options:\n\n1. Use `--reduced-profile` to include only lines and files with memory/CPU/GPU activity.\n2. Use `--profile-only` to include only filenames containing specific strings (as in, `--profile-only foo,bar,baz`).\n3. Decorate functions of interest with `@profile` to have Scalene report _only_ those functions.\n4. Turn profiling on and off programmatically by importing Scalene (`import scalene`) and then turning profiling on and off via `scalene_profiler.start()` and `scalene_profiler.stop()`. By default, Scalene runs with profiling on, so to delay profiling until desired, use the `--off` command-line option (`python3 -m scalene --off yourprogram.py`).\n</details>\n\n<details>\n<summary>\nHow do I run Scalene in PyCharm?\n</summary>\n\n**A:**  In PyCharm, you can run Scalene at the command line by opening the terminal at the bottom of the IDE and running a Scalene command (e.g., `python -m scalene <your program>`). Use the options `--cli`, `--html`, and `--outfile <your output.html>` to generate an HTML file that you can then view in the IDE.\n</details>\n\n<details>\n<summary>\nHow do I use Scalene with Django?\n</summary>\n\n**A:** Pass in the `--noreload` option (see https://github.com/plasma-umass/scalene/issues/178).\n</details>\n\n\n<details>\n<summary>\nDoes Scalene work with gevent/Greenlets?\n</summary>\n\n**A:** Yes! Put the following code in the beginning of your program, or modify the call to `monkey.patch_all` as below:\n\n```python\nfrom gevent import monkey\nmonkey.patch_all(thread=False)\n```\n</details>\n\n\n\n<details>\n<summary>\nHow do I use Scalene with PyTorch on the Mac?\n</summary>\n\n**A:** Scalene works with PyTorch version 1.5.1 on Mac OS X. There's a bug in newer versions of PyTorch (https://github.com/pytorch/pytorch/issues/57185) that interferes with Scalene (discussion here: https://github.com/plasma-umass/scalene/issues/110), but only on Macs.\n</details>\n\n# Technical Information\n\nFor details about how Scalene works, please see the following paper, which won the Jay Lepreau Best Paper Award at [OSDI 2023](https://www.usenix.org/conference/osdi23/presentation/berger): [Triangulating Python Performance Issues with Scalene](https://arxiv.org/pdf/2212.07597). (Note that this paper does not include information about the AI-driven proposed optimizations.)\n\n<details>\n<summary>\nTo cite Scalene in an academic paper, please use the following:\n</summary>\n\n```latex\n@inproceedings{288540,\nauthor = {Emery D. Berger and Sam Stern and Juan Altmayer Pizzorno},\ntitle = {Triangulating Python Performance Issues with {S}calene},\nbooktitle = {{17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23)}},\nyear = {2023},\nisbn = {978-1-939133-34-2},\naddress = {Boston, MA},\npages = {51--64},\nurl = {https://www.usenix.org/conference/osdi23/presentation/berger},\npublisher = {USENIX Association},\nmonth = jul\n}\n```\n</details>\n\n\n# Success Stories\n\nIf you use Scalene to successfully debug a performance problem, please [add a comment to this issue](https://github.com/plasma-umass/scalene/issues/58)!\n\n\n# Acknowledgements\n\nLogo created by [Sophia Berger](https://www.linkedin.com/in/sophia-berger/).\n\nThis material is based upon work supported by the National Science\nFoundation under Grant No. 1955610. Any opinions, findings, and\nconclusions or recommendations expressed in this material are those of\nthe author(s) and do not necessarily reflect the views of the National\nScience Foundation.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Scalene: A high-resolution, low-overhead CPU, GPU, and memory profiler for Python with AI-powered optimization suggestions",
    "version": "1.5.39",
    "project_urls": {
        "Homepage": "https://github.com/plasma-umass/scalene"
    },
    "split_keywords": [
        "performance",
        "memory",
        "profiler"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "978eb29138e2177f546172758c7182cf8c181a1577c147941f4ea3ada18faac1",
                "md5": "8dc03c2338a9eecf45aa36a0022dfdb2",
                "sha256": "ae9912f938dfaf4da40df3235c173b94474c8d7a663a3c0bea5adcebef8af3dd"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp310-cp310-macosx_12_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "8dc03c2338a9eecf45aa36a0022dfdb2",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 534120,
            "upload_time": "2024-04-15T20:51:20",
            "upload_time_iso_8601": "2024-04-15T20:51:20.814270Z",
            "url": "https://files.pythonhosted.org/packages/97/8e/b29138e2177f546172758c7182cf8c181a1577c147941f4ea3ada18faac1/scalene-1.5.39-cp310-cp310-macosx_12_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53aa9ed8db3a10984da5fa0fe37a9766e0a5cd2fba39fefc7dd740594f47b9ed",
                "md5": "b7195085a55e7eafa86080d2963fdb7f",
                "sha256": "82a7f49bf19946081b369caff70eaad3f7fd01f3d3f294962131f9714e490bdc"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b7195085a55e7eafa86080d2963fdb7f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 839027,
            "upload_time": "2024-04-15T20:49:38",
            "upload_time_iso_8601": "2024-04-15T20:49:38.690088Z",
            "url": "https://files.pythonhosted.org/packages/53/aa/9ed8db3a10984da5fa0fe37a9766e0a5cd2fba39fefc7dd740594f47b9ed/scalene-1.5.39-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19be5f8ccaed7b149b8e2502920b12b0dedc8d65afe440297aa6cccb2177526c",
                "md5": "7e6917875d5a2b0ea603b806c001d84e",
                "sha256": "cc68f7ee18d76f53cc86426624c7d9c957c8780d8d053d111ed961da60e4decb"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7e6917875d5a2b0ea603b806c001d84e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 854694,
            "upload_time": "2024-04-15T20:49:42",
            "upload_time_iso_8601": "2024-04-15T20:49:42.866659Z",
            "url": "https://files.pythonhosted.org/packages/19/be/5f8ccaed7b149b8e2502920b12b0dedc8d65afe440297aa6cccb2177526c/scalene-1.5.39-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e7dd88c7caea711d1a36319a2cef7510ce19d5f7f8383e41a1ef31e5c01f686",
                "md5": "2cf02c0b4e7adff269a93b09e5382888",
                "sha256": "1e275d3f1a5f0b44133ad2b22cf7451ea50a73ca1f0b32369376bf96cabb51d3"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2cf02c0b4e7adff269a93b09e5382888",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 365154,
            "upload_time": "2024-04-15T20:49:42",
            "upload_time_iso_8601": "2024-04-15T20:49:42.595476Z",
            "url": "https://files.pythonhosted.org/packages/4e/7d/d88c7caea711d1a36319a2cef7510ce19d5f7f8383e41a1ef31e5c01f686/scalene-1.5.39-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d0d2384d35b606c3330ee18659111dade5e87bb23829431331c0934d7e90849",
                "md5": "c98b6da08d5c8f1aaed0a89d5722d355",
                "sha256": "024db771d38a4d3405986a3159cc9055294b20e90532ab1f23f60b4fbc6dd331"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp311-cp311-macosx_12_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "c98b6da08d5c8f1aaed0a89d5722d355",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 535251,
            "upload_time": "2024-04-15T20:52:32",
            "upload_time_iso_8601": "2024-04-15T20:52:32.707552Z",
            "url": "https://files.pythonhosted.org/packages/2d/0d/2384d35b606c3330ee18659111dade5e87bb23829431331c0934d7e90849/scalene-1.5.39-cp311-cp311-macosx_12_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "effcf6c9ff2399ce4d26c0ea13c4ebfd06955516013bada7460099880203d372",
                "md5": "4cb9351f1e74f4967164b250ada03f9a",
                "sha256": "317e32c4e3aad680673eb6bcac5c71f988689bed6466795a140f882587ec1f2a"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4cb9351f1e74f4967164b250ada03f9a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 848295,
            "upload_time": "2024-04-15T20:49:34",
            "upload_time_iso_8601": "2024-04-15T20:49:34.288781Z",
            "url": "https://files.pythonhosted.org/packages/ef/fc/f6c9ff2399ce4d26c0ea13c4ebfd06955516013bada7460099880203d372/scalene-1.5.39-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c6f98cb2ec91f159b046744b43092a38a4b4624d19dfb04a9d7c013e62c78ca",
                "md5": "19644001031d69f3a99323166bc65422",
                "sha256": "0cae3016a013257fdbfd7bd6b6e27ba84bf8374fb0a7872bd22bf2423ac98005"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "19644001031d69f3a99323166bc65422",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 863591,
            "upload_time": "2024-04-15T20:49:38",
            "upload_time_iso_8601": "2024-04-15T20:49:38.900390Z",
            "url": "https://files.pythonhosted.org/packages/7c/6f/98cb2ec91f159b046744b43092a38a4b4624d19dfb04a9d7c013e62c78ca/scalene-1.5.39-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "580b3299a1deab35700061563e596246efd170a64a6fad6a151df7a8368c3078",
                "md5": "909f53f88d9b52babba63d9573841e11",
                "sha256": "b0f76fb25261bed5e2f38c2be061efb256eb5bc426a3d3970838213ef2c4d232"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp312-cp312-macosx_12_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "909f53f88d9b52babba63d9573841e11",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 535741,
            "upload_time": "2024-04-15T20:52:32",
            "upload_time_iso_8601": "2024-04-15T20:52:32.521071Z",
            "url": "https://files.pythonhosted.org/packages/58/0b/3299a1deab35700061563e596246efd170a64a6fad6a151df7a8368c3078/scalene-1.5.39-cp312-cp312-macosx_12_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6a033441b87980a456548ab672b46ca51070fc2945238d9158d6389a1d590f3",
                "md5": "d0f16743c2ef37b4522ac7a09df56645",
                "sha256": "a2e8f2b32b59c4a0722b6162eb1bb386de95769574fc5e892c56328d0bfded49"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d0f16743c2ef37b4522ac7a09df56645",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 855368,
            "upload_time": "2024-04-15T20:49:36",
            "upload_time_iso_8601": "2024-04-15T20:49:36.350864Z",
            "url": "https://files.pythonhosted.org/packages/b6/a0/33441b87980a456548ab672b46ca51070fc2945238d9158d6389a1d590f3/scalene-1.5.39-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ebd567a2883013a17edfbf807758ff0eef5836a73bb40197494c20f8e96dc47",
                "md5": "fd503c78c001daf7b12e8b56b1cf85cc",
                "sha256": "67cb12d2c42c8592af7f8c874c2d6da7c939607e92cdc724216d1b4f058995f3"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fd503c78c001daf7b12e8b56b1cf85cc",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 869622,
            "upload_time": "2024-04-15T20:49:37",
            "upload_time_iso_8601": "2024-04-15T20:49:37.323660Z",
            "url": "https://files.pythonhosted.org/packages/4e/bd/567a2883013a17edfbf807758ff0eef5836a73bb40197494c20f8e96dc47/scalene-1.5.39-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "832149f7d747019348a7cf0c572c3c860ea4dc5392e8cb1d09d67f2f54500a36",
                "md5": "a2e1548a9ae206755611859339ba21e1",
                "sha256": "c6524e85b78e18a9a3431356ba503a55d0c84d496c03bd6e1f4fc4b3dfe19855"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a2e1548a9ae206755611859339ba21e1",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 365155,
            "upload_time": "2024-04-15T20:49:41",
            "upload_time_iso_8601": "2024-04-15T20:49:41.361777Z",
            "url": "https://files.pythonhosted.org/packages/83/21/49f7d747019348a7cf0c572c3c860ea4dc5392e8cb1d09d67f2f54500a36/scalene-1.5.39-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d9738226a192762653fb78dbf89fe22e725a46427d444ccf3a71f4b75c3a11e",
                "md5": "27e8036868286432fc011502db4e90e1",
                "sha256": "4e903faf50b831b198ae774b2f462a19f8a79a98637800d0912992bcc4d953e8"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp38-cp38-macosx_12_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "27e8036868286432fc011502db4e90e1",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 534193,
            "upload_time": "2024-04-15T20:53:33",
            "upload_time_iso_8601": "2024-04-15T20:53:33.659469Z",
            "url": "https://files.pythonhosted.org/packages/8d/97/38226a192762653fb78dbf89fe22e725a46427d444ccf3a71f4b75c3a11e/scalene-1.5.39-cp38-cp38-macosx_12_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a745fe2a5de671c475cea2803c6940aa1c4efea93a32088bf2a8138bd0e20d70",
                "md5": "b71aa702419c1f17553e546dd6a01871",
                "sha256": "f6bdb0411157940f2d9c1c68eca980bd1ce162355d24e7da98f205bd888fcb51"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b71aa702419c1f17553e546dd6a01871",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 839558,
            "upload_time": "2024-04-15T20:49:40",
            "upload_time_iso_8601": "2024-04-15T20:49:40.642735Z",
            "url": "https://files.pythonhosted.org/packages/a7/45/fe2a5de671c475cea2803c6940aa1c4efea93a32088bf2a8138bd0e20d70/scalene-1.5.39-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "818d00ebb2ac315e1f287cb8fd113e65d23a7975291a15980164675fe72f3d71",
                "md5": "a445e64b842759532640f5a293b02971",
                "sha256": "ecbd6bcefc0e2ac07216bba2305b4c75809421906726cdff0f96a49b62cfb85a"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a445e64b842759532640f5a293b02971",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 855402,
            "upload_time": "2024-04-15T20:49:37",
            "upload_time_iso_8601": "2024-04-15T20:49:37.326241Z",
            "url": "https://files.pythonhosted.org/packages/81/8d/00ebb2ac315e1f287cb8fd113e65d23a7975291a15980164675fe72f3d71/scalene-1.5.39-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f0f6f534b814166dcfec6c4aa3c30d5c823574c6df7fb4657f0ced8b731d17e",
                "md5": "16989a21ea7093af1eb2c629f5e8479e",
                "sha256": "bdecf0a24c8f66e75470cada744441691f028c7665b737e0f68bfde2c7ff4806"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "16989a21ea7093af1eb2c629f5e8479e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 365168,
            "upload_time": "2024-04-15T20:49:53",
            "upload_time_iso_8601": "2024-04-15T20:49:53.501501Z",
            "url": "https://files.pythonhosted.org/packages/6f/0f/6f534b814166dcfec6c4aa3c30d5c823574c6df7fb4657f0ced8b731d17e/scalene-1.5.39-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6067627fac4e75735237cec936ec7818e667b57ccebdce314766af2a3d428a1b",
                "md5": "fbcaf4db178f9ac0bf0d3e547edb4b70",
                "sha256": "aeaf460507b6b4940d914c7d4a24067c44b7f0ed7f5ebc02d1980a7fc7e27503"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp39-cp39-macosx_12_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "fbcaf4db178f9ac0bf0d3e547edb4b70",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 534119,
            "upload_time": "2024-04-15T20:53:44",
            "upload_time_iso_8601": "2024-04-15T20:53:44.007206Z",
            "url": "https://files.pythonhosted.org/packages/60/67/627fac4e75735237cec936ec7818e667b57ccebdce314766af2a3d428a1b/scalene-1.5.39-cp39-cp39-macosx_12_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56ecb7c7582b140603dbf88da21dc016adeb3f59770d5a18704dd4469b1c0d32",
                "md5": "acaba17d60a0685c123e291c0f9cc34a",
                "sha256": "135770e9e88ce57ace0bf533de563e3e25963ff4ae7a5b4c4e4519e1f3b04c64"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "acaba17d60a0685c123e291c0f9cc34a",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 837791,
            "upload_time": "2024-04-15T20:49:36",
            "upload_time_iso_8601": "2024-04-15T20:49:36.586905Z",
            "url": "https://files.pythonhosted.org/packages/56/ec/b7c7582b140603dbf88da21dc016adeb3f59770d5a18704dd4469b1c0d32/scalene-1.5.39-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aad152191db69134c3a0c260b34c921b1ff68cebd4a0a77dab7acbe14ae6ddb8",
                "md5": "6fec3bec3f772c6c4c993656f1e218be",
                "sha256": "e14bbec870293426d8c2d103dd9f2e3e43c4d131d8625a7584bfe22edbc6c9e7"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6fec3bec3f772c6c4c993656f1e218be",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 853874,
            "upload_time": "2024-04-15T20:49:38",
            "upload_time_iso_8601": "2024-04-15T20:49:38.010366Z",
            "url": "https://files.pythonhosted.org/packages/aa/d1/52191db69134c3a0c260b34c921b1ff68cebd4a0a77dab7acbe14ae6ddb8/scalene-1.5.39-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09364fda347227a975818bd4a77ef2f4e699ba8045f454060502b7b5b4bd2da4",
                "md5": "c5eaec495906302de6051e9962b75c25",
                "sha256": "c7e977f6aea19f029ee66d3d2fa8b8d5dc5c9f0fe1a3531a1ca40db9ac4fab3a"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c5eaec495906302de6051e9962b75c25",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 365153,
            "upload_time": "2024-04-15T20:49:37",
            "upload_time_iso_8601": "2024-04-15T20:49:37.633564Z",
            "url": "https://files.pythonhosted.org/packages/09/36/4fda347227a975818bd4a77ef2f4e699ba8045f454060502b7b5b4bd2da4/scalene-1.5.39-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc85986afd83440d1c408795ee70486a6a246339d8bdfc24cc933abc6ce424dd",
                "md5": "ed741c0c26ae2c45f75e456bcf6a3b4b",
                "sha256": "078a432cfdfee7ab68419caf87afba3629822afd1ca5c3b4c9d72a575b496648"
            },
            "downloads": -1,
            "filename": "scalene-1.5.39.tar.gz",
            "has_sig": false,
            "md5_digest": "ed741c0c26ae2c45f75e456bcf6a3b4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "!=3.11.0,>=3.8",
            "size": 8721790,
            "upload_time": "2024-04-15T20:52:34",
            "upload_time_iso_8601": "2024-04-15T20:52:34.942775Z",
            "url": "https://files.pythonhosted.org/packages/dc/85/986afd83440d1c408795ee70486a6a246339d8bdfc24cc933abc6ce424dd/scalene-1.5.39.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 20:52:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plasma-umass",
    "github_project": "scalene",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "astunparse",
            "specs": [
                [
                    ">=",
                    "1.6.3"
                ]
            ]
        },
        {
            "name": "cloudpickle",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "Cython",
            "specs": [
                [
                    ">=",
                    "0.29.28"
                ]
            ]
        },
        {
            "name": "crdp",
            "specs": []
        },
        {
            "name": "ipython",
            "specs": [
                [
                    ">=",
                    "8.10"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.0.3"
                ]
            ]
        },
        {
            "name": "lxml",
            "specs": [
                [
                    "==",
                    "5.1.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "20.9"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    ">=",
                    "5.9.2"
                ]
            ]
        },
        {
            "name": "pyperf",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "10.7.0"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    ">=",
                    "65.5.1"
                ]
            ]
        },
        {
            "name": "pynvml",
            "specs": [
                [
                    "<=",
                    "11.5"
                ],
                [
                    ">=",
                    "11.0"
                ]
            ]
        },
        {
            "name": "wheel",
            "specs": [
                [
                    "~=",
                    "0.38.1"
                ]
            ]
        }
    ],
    "lcname": "scalene"
}
        
Elapsed time: 0.37999s