feat(ci): add Criterion performance benchmarks for hot paths (#638)

Add benchmarks using Criterion for:
- XML tool-call parsing (single and multi-call)
- Native tool-call parsing
- SQLite memory store/recall/count operations
- Full agent turn cycle (text-only and with tool call)

Add CI workflow (.github/workflows/benchmarks.yml) that:
- Runs benchmarks on push to main and on PRs
- Uploads Criterion results as artifacts
- Posts benchmark summary as PR comment for regression visibility

Ref: https://github.com/zeroclaw-labs/zeroclaw/issues/618 (item 7)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Alex Gorevski 2026-02-17 12:15:19 -08:00 committed by GitHub
parent 290d971d5e
commit 8724884b00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 650 additions and 2 deletions

View file

@ -171,3 +171,8 @@ panic = "abort"
[dev-dependencies]
tokio-test = "0.4"
tempfile = "3.14"
criterion = { version = "0.5", features = ["async_tokio"] }
[[bench]]
name = "agent_benchmarks"
harness = false