Skip to content

Benchmarking part 2: integrate airspeed-velocity (asv) + PR benchmark bot #15

Open

Description

@JuroOravec

citry already has benchmark scenario tests (packages/py/citry/tests/test_benchmark_*.py - the Django/DJC/Jinja comparisons, skipped when the benchmark dependency group is absent), but no airspeed-velocity (asv) timing harness or CI comparison. This tracks "benchmarking part 2": integrating asv the way django-components / djc-core do.

Scope

  1. asv harness (port + adapt to citry):
    • asv.conf.json at the repo root
    • a benchmarks/ dir with the asv benchmark modules + helpers, adapted from django-components' benchmarks/ (benchmark_templating.py, utils.py, the asv monkeypatches)
  2. asv CI gotchas to carry over from upstream:
    • pin virtualenv<20.31 (asv #1484)
    • the asv_runner timeraw.py monkeypatch (asv_runner #45)
    • a *_BENCHMARK_QUICK=1 quick mode for PR runs
  3. PR benchmark bot - two workflows like upstream:
    • generate: asv run <base>^! + asv run HEAD^!, then asv compare <base> HEAD --factor 1.1 --split, upload a results artifact
    • comment: triggered by workflow_run, posts the comparison as a PR comment (github-script)

Blocks / relates to

The "benchmark PR comparison" item from the project-setup plumbing audit depends on this (the PR bot is step 3 here).

Reference

django-components: asv.conf.json, benchmarks/, .github/workflows/pr-benchmark-generate.yml, .github/workflows/pr-benchmark-comment.yml.

Activity

  1. added
    next-sprint
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions