Registry / testing / asv
library0.6.5pypypiunverified

Airspeed Velocity (asv) is a tool for benchmarking Python packages over their lifetime. It is primarily designed to benchmark a single project over its lifetime using a given suite of benchmarks. The results are displayed in an interactive web frontend that requires only a basic static webserver to host. The current version is 0.6.5, released in September 2025, and it maintains a relatively active release cadence with several updates per year.

pip install asv
INSTALL
IMPORT
SIG · ASV
A
asv
testingpythonv0.6.5
Install
3.1s avg
Import
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 38.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.1s · import 0.000s · 37MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

asv
asv <command>
import asv; asv.run()
ASV is primarily a command-line interface (CLI) tool. While it uses Python for defining benchmarks, its core functionality is exposed via shell commands like `asv run`, `asv publish`, etc., rather than direct programmatic Python imports in user applications.

To get started, navigate to your project directory (or a new directory for benchmarks) and run `asv quickstart` to set up the basic configuration and an example benchmark file. Then, define your benchmarks in Python files within the `benchmarks/` directory, typically as classes with `time_` or `mem_` prefixed methods. Finally, execute `asv run` to collect benchmark data and `asv publish` to generate the interactive web report, which can be viewed with `asv browse`.

# 1. Initialize a new ASV benchmark suite # Run this in your project's root or a dedicated benchmark directory. asv quickstart # 2. Add a benchmark to benchmarks/benchmarks.py (example content below) # Create or edit 'benchmarks/benchmarks.py' with content like: # import numpy as np # # class TimeSuite: # def setup(self): # self.x = np.random.rand(1000, 1000) # # def time_sum_array(self): # np.sum(self.x) # # def time_dot_product(self): # np.dot(self.x, self.x) # # def teardown(self): # self.x = None # # class MemSuite: # def mem_full_array(self): # return np.random.rand(1000, 1000) # 3. Run the benchmarks asv run # 4. Publish the results to a web frontend asv publish # 5. Open the results in a web browser asv browse
asv --version
Debug
Known issues
breakingChanging benchmark names, class names, or parameter names within your `benchmarks.py` files can invalidate historical data in ASV's reports. This makes it difficult to compare new results with past performance for the renamed benchmarks, essentially starting a new series.
fix
Carefully consider benchmark naming conventions from the start. If changes are necessary, acknowledge that historical data for that specific benchmark series will be lost or fragmented. Documentation advises on pitfalls of changing `benchmark_name` attributes.
affects: All versions
gotchaASV is fundamentally a command-line tool (`asv quickstart`, `asv run`, `asv publish`, etc.). It's not typically imported as a Python library for direct programmatic use in application code. Attempting `import asv` to access benchmark running logic directly is not the intended usage model for most users.
fix
Interact with ASV via its command-line interface. Benchmark definitions are Python code, but the execution and reporting are driven by the `asv` command.
affects: All versions
gotchaWhen configuring benchmark dependencies, `asv.conf.json` can specify `environment_matrix` settings (e.g., Python versions, specific package versions). If you also use `conda` or `mamba` with an `environment.yml` file, the explicit dependencies listed in `environment_matrix` within `asv.conf.json` will override those in `environment.yml`.
fix
Be mindful of the precedence: `environment_matrix` in `asv.conf.json` takes priority. Ensure your dependency specifications are consistent or intentionally configured across both files if you use both methods.
affects: >=0.6.1
gotchaASV relies on Git or Mercurial for tracking project history and associating benchmark results with specific commits. While it can run benchmarks locally, its primary strength—historical performance tracking—requires an initialized Git or Mercurial repository.
fix
Ensure your project is under version control (Git or Mercurial) and that the `repo` path in `asv.conf.json` correctly points to your repository.
affects: All versions
gotchaThe acronym 'ASV' is also used in other contexts, such as Adaptive Servo-Ventilation (medical devices for sleep apnea) and ASV Inventions (motorcycle parts). When searching for or discussing the Python benchmarking tool, ensure the context is clear to avoid confusion.
fix
Specify 'Python asv' or 'Airspeed Velocity' when referring to this library.
affects: All versions
Upgrade
Version history
0.6.5latest on PyPI · released Sep 13, 2025
Audit
Dependencies
pythonrequiredRequired Python version.
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
asv — pip install asv · libregistry