Skip to main content

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

  1. A background thread samples this process via profiling.sampling.sample(pid, ...).
  2. The main thread runs your function in a loop for sample_duration.
  3. 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

asv_bench_tachyon-0.1.0.tar.gz (231.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asv_bench_tachyon-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for asv_bench_tachyon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 790e1cba3aa49155bdfe9a63dc44ac39951e8f2fbf80dd19408a5aecd9ec7bbf
MD5 05b4349f3720ac9692111dd979d466fa
BLAKE2b-256 34e0bde9602dff759da86067dc4cdd6ea7c3f07d881fe73041429aa7c490dd32

See more details on using hashes here.

File details

Details for the file asv_bench_tachyon-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for asv_bench_tachyon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fb7c63acd82ee263c1b856c7eca1e8a39075e262ef2748d0765ce74ce6069c9
MD5 5b4619d433f081a52c3d597d31a011bb
BLAKE2b-256 0be11b901b056dc1dd40b010cbf2f080c7badd11a008cae5e3740570559cc4d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page