asv_bench_tachyon
Real ASV benchmark plugin (same shape as asv_bench_memray): a new metric type discovered by asv_runner, stored in results, plotted and compared across commits.
Uses Python 3.15 Tachyon (profiling.sampling) to estimate self-time per call from stack samples.
This is a metric plugin
asv_bench_tachyon |
asv profile / flame graphs |
|
|---|---|---|
| ASV name | sample_* / Sample* |
N/A |
asv run stores a number |
yes | no |
| Graphs / compare / regressions | yes | no |
| Discovery | package name asv_bench* |
conf plugins / GUI |
Install
# into the same env ASV uses for the project (Python >= 3.15)
pip install asv_bench_tachyon
asv.conf.json:
{
"matrix": {
"req": {
"pip+asv_bench_tachyon": [""]
}
}
}
Write a benchmark
class Suite:
def sample_hot_loop(self):
s = 0
for i in range(200_000):
s += i * i
return s
sample_hot_loop.sample_mode = "cpu" # wall | cpu | gil
sample_hot_loop.sample_duration = 0.25 # seconds of sampling
asv run --bench sample_hot_loop
Result unit: seconds (estimated exclusive time per call from sample counts × interval).
How it works
- A background thread samples this process via
profiling.sampling.sample(pid, ...). - The main thread runs your function in a loop for
sample_duration. - Direct samples whose function name matches the benchmark are converted to time and divided by call count.
Same discovery contract as memray: export_as_benchmark = [SampleTimeBenchmark].
Optional CLI
asv-tachyon doctor
License
MIT.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asv_bench_tachyon-0.1.0.tar.gz.
File metadata
- Download URL: asv_bench_tachyon-0.1.0.tar.gz
- Upload date:
- Size: 231.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
790e1cba3aa49155bdfe9a63dc44ac39951e8f2fbf80dd19408a5aecd9ec7bbf
|
|
| MD5 |
05b4349f3720ac9692111dd979d466fa
|
|
| BLAKE2b-256 |
34e0bde9602dff759da86067dc4cdd6ea7c3f07d881fe73041429aa7c490dd32
|
File details
Details for the file asv_bench_tachyon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: asv_bench_tachyon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb7c63acd82ee263c1b856c7eca1e8a39075e262ef2748d0765ce74ce6069c9
|
|
| MD5 |
5b4619d433f081a52c3d597d31a011bb
|
|
| BLAKE2b-256 |
0be11b901b056dc1dd40b010cbf2f080c7badd11a008cae5e3740570559cc4d0
|