scalene

github.com/plasma-umass/scalene Developer Tools Open-source projectOpen source

High-performance, high-precision CPU, GPU, and memory profiler for Python.

github.com/plasma-umass/scalene
scalene homepage screenshot

About scalene

Scalene is an open source profiler for Python programs that measures CPU, GPU, and memory use. According to its project documentation, it runs much faster than many other Python profilers while producing more detailed information. It can be used from the command line, through a Visual Studio Code extension, or through a web-based viewer.

Scalene can also generate AI-proposed optimizations for a selected line or region of code. Users choose an AI provider, which may be Amazon Bedrock, Microsoft Azure, OpenAI, or a local model run with Ollama, and enter credentials if the provider requires them. The project notes that suggestions vary between runs and that results may differ.

Key features

  • Profiles CPU, GPU, and memory usage of Python programs
  • Generates AI-proposed optimizations for a selected line or code region
  • Supports Amazon Bedrock, Microsoft Azure, OpenAI, and Ollama for suggestions
  • Can read API keys from environment variables for a local viewing session
  • Command-line output options include terminal, HTML, and standalone HTML
  • Visual Studio Code extension that displays a profile in a webview
Best for: Python developers who want to find where CPU, GPU, and memory time is spent in their code and, optionally, get AI-generated optimization suggestions.
Good for
  • Described by the project as faster than many other Python profilers while giving more detailed information
  • Open source
  • Supports local models through Ollama as an option for AI suggestions
Watch out for
  • AI suggestions require selecting a provider and entering credentials, and cloud providers involve external services
  • The project notes that suggestions vary and that results may differ between runs
  • In the VS Code extension, a profile appears only if the code runs for at least a second

scalene at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

scalene alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Developer Tools

Well-known listings from the same topic.

All 423

scalene FAQ

How do I enable AI-powered optimization suggestions?
Select an AI provider and, if needed, enter your credentials in the "AI Optimization Options" box. Credentials can also be prefilled from environment variables such as OPENAI_API_KEY by running scalene view --api-keys-from-env.
Are API keys saved in the profile file?
The project states that keys loaded from environment variables are passed only to the local browser session and are never written into the HTML file.
How can Scalene be installed?
It can be installed with python3 -m pip install -U scalene or with conda install -c conda-forge scalene.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing