All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This project uses towncrier and the changes for the upcoming release can be found in https://github.com/twisted/my-project/tree/main/changelog.d/.
0.3.1 - 15-08-2026
- Class-level
setup(self)no longer runs insidedo_setup_cache. Bound methods are not treated as parameter-free module hooks, sosetup_cacheruns first again (#52).
0.3.0 - 04-08-2026
asv_runner.__version__is now defined for source-tree and editable imports, resolving the installed distribution version with a0.0.0.dev0fallback; built artifacts keep the static build-time string. (#53)- Releases publish the sdist alongside wheels again: the wheel and sdist jobs uploaded artifacts under the same default name and the publish step picked up only the wheel, which is why 0.2.5 reached PyPI wheel-only and downstream rebuilds from GitHub tarballs shipped wrong version metadata. (#53)
- Timing benchmarks with
setuphooks now observe freshly set-up state on every timed call (asv#966): warmup re-runssetupbetween calls, auto-calibratednumberresolves to 1, and an explicitly setnumber > 1batches withsetupinterleaved between individually timed calls (only the calls are timed, at the cost of two clock reads per call). Benchmarks withoutsetuphooks are unchanged,setup_cacheremains the batching path for input-building setups, andtimeraw_*benchmarks (one fresh subprocess per sample) are exempt. Timings for fast benchmarks that definesetupwill shift relative to earlier releases because samples are no longer amortized over auto-calibrated batches. (#53)
0.2.4 - 27-06-2026
- Benchmark
versionremains SHA-256 of source text for full backwards compatibility with asv and historical results. Token-stablecode_fingerprint()is exposed viaversion_alts(and still used where helpful) so tooling can backfill/accept both identities across releases. Timerawenvidentity also uses SHA-256 of code+env payload on the wire. (#53)
0.2.3 - 27-06-2026
- Forward timeraw timed-subprocess stderr to the parent process so asv can
record it (restores
timeraw_countstderr markers). Default benchmarkversionis again SHA-256 of source text for compatibility with asv discovery tests; token-stablecode_fingerprint()remains for optional use (e.g. timerawenvidentity). (#52)
0.2.2 - 27-06-2026
- Add
@benchmark(**attrs)inasv_runner.benchmarks.markto set recognized benchmark metadata (pretty_name,timeout, …) with a typed decorator API (airspeed-velocity/asv#1469). (#1469) - Timeraw benchmarks honor an
envdict (also@benchmark(env=...)) merged into the timed subprocess environment. Values must not beNone. Defaultversionfingerprintsenvso env-only changes do not reuse prior result rows (airspeed-velocity/asv#1471). (#1471)
setup_cacheresults are stored withset_cacheinstead of prepending onto_current_params, so@skip_for_params/skip_paramsmatch user parameter tuples again when a cache is in use (asv_runner#49). (#49)- Fork-server cleanup ignores
KeyboardInterruptwhile closing the client socket or unlinking the stdout capture file, avoiding intermittent traceback noise when the parent delivers SIGINT during teardown (airspeed-velocity/asv#1511). (#1511) - Parameter-free
setuphooks (for example module-level seed helpers in pandas benchmarks) run beforesetup_cacheso cache builds see the same environment as timed runs (airspeed-velocity/asv#1592). (#1592)
- Document and regression-test that timing samples are seconds per call after
dividing by
number, guarding against systematic ~50% under-reporting for fixednumber=1workloads (asv_runner#33). (#33) - Default benchmark
versionhashes a Python token stream (comments and non-semantic whitespace ignored) so cosmetic edits do not invalidate results (asv_runner#43). Falls back to raw bytes if tokenization fails. (#43) - Replace a Python 3.8 walrus expression in
benchmarks/__init__.pyso the package parses and runs on Python 3.7 as required. (#48)
0.2.1 - 11-02-2024
No significant changes.
0.2.0 - 11-02-2024
asv_runnernow usestowncrierto manage the changelog, also adds the changeglog to the generated documentation. (#38)- The lowest supported version of
pythonfor building theasv_runnerdocumentation is now3.8, since3.7has been EOL for many months now. (#39)
0.1.0 - 11-09-2023
- Default
max_timeis set to60.0seconds to fix--quick. (#29) asvwill not try to access a missingcoloramaattribute. (#32)
pip-toolsandpip-compileare used to pin transitive dependencies for read the docs. (#31)
0.0.9 - 20-08-2023
- Adds a
skip_benchmarkdecorator.
from asv_runner.benchmarks.helpers import skip_benchmark
@skip_benchmark
class TimeSuite:
"""
An example benchmark that times the performance of various kinds
of iterating over dictionaries in Python.
"""
def setup(self):
self.d = {}
for x in range(500):
self.d[x] = None
def time_keys(self):
for key in self.d.keys():
pass
def time_values(self):
for value in self.d.values():
pass
def time_range(self):
d = self.d
for key in range(500):
d[key]Usage requires asv 0.6.0.
(#13)
- Finely grained
skip_benchmark_ifandskip_params_ifhave been added.
from asv_runner.benchmarks.mark import skip_benchmark_if, skip_params_if
import datetime
class TimeSuite:
"""
An example benchmark that times the performance of various kinds
of iterating over dictionaries in Python.
"""
params = [100, 200, 300, 400, 500]
param_names = ["size"]
def setup(self, size):
self.d = {}
for x in range(size):
self.d[x] = None
@skip_benchmark_if(datetime.datetime.now().hour >= 12)
def time_keys(self, size):
for key in self.d.keys():
pass
@skip_benchmark_if(datetime.datetime.now().hour >= 12)
def time_values(self, size):
for value in self.d.values():
pass
@skip_benchmark_if(datetime.datetime.now().hour >= 12)
def time_range(self, size):
d = self.d
for key in range(size):
d[key]
# Skip benchmarking when size is either 100 or 200 and the current hour is
12 or later.
@skip_params_if([(100,), (200,)],
datetime.datetime.now().hour >= 12)
def time_dict_update(self, size):
d = self.d
for i in range(size):
d[i] = iUsage requires asv 0.6.0.
(#17)
- Benchmarks can now be parameterized using decorators.
import numpy as np
from asv_runner.benchmarks.mark import parameterize
@parameterize({"n":[10, 100]})
def time_sort(n):
np.sort(np.random.rand(n))
@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']})
def time_ranges_multi(n, func_name):
f = {'range': range, 'arange': np.arange}[func_name]
for i in f(n):
pass
@parameterize({"size": [10, 100, 200]})
class TimeSuiteDecoratorSingle:
def setup(self, size):
self.d = {}
for x in range(size):
self.d[x] = None
def time_keys(self, size):
for key in self.d.keys():
pass
def time_values(self, size):
for value in self.d.values():
pass
@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']})
class TimeSuiteMultiDecorator:
def time_ranges(self, n, func_name):
f = {'range': range, 'arange': np.arange}[func_name]
for i in f(n):
passUsage requires asv 0.6.0.
(#18)
- Benchmarks can now be skipped during execution.
from asv_runner.benchmarks.mark import skip_for_params, parameterize,
SkipNotImplemented
# Fast because no setup is called
class SimpleFast:
params = ([False, True])
param_names = ["ok"]
@skip_for_params([(False, )])
def time_failure(self, ok):
if ok:
x = 34.2**4.2
@parameterize({"ok": [False, True]})
class SimpleSlow:
def time_failure(self, ok):
if ok:
x = 34.2**4.2
else:
raise SkipNotImplemented(f"{ok} is skipped")Usage requires asv 0.6.0.
(#20)
- It is possible to set a default timeout from
asv. (#19)
- Documentation, both long-form and API level has been added. (#6)