{"id":51092153,"url":"https://github.com/ryancswallace/benchmatrix","last_synced_at":"2026-06-24T03:35:57.816Z","repository":{"id":366672178,"uuid":"1274323820","full_name":"ryancswallace/benchmatrix","owner":"ryancswallace","description":"Build pytest-benchmark matrices and parse benchmark results with lightweight Python utilities.","archived":false,"fork":false,"pushed_at":"2026-06-22T21:38:27.000Z","size":222,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-22T22:06:44.664Z","etag":null,"topics":["benchmark","benchmarking","performance","pytest","pytest-benchmark","python"],"latest_commit_sha":null,"homepage":"https://ryancswallace.github.io/benchmatrix/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryancswallace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-19T11:53:57.000Z","updated_at":"2026-06-22T21:38:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ryancswallace/benchmatrix","commit_stats":null,"previous_names":["ryancswallace/benchmatrix"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ryancswallace/benchmatrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancswallace%2Fbenchmatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancswallace%2Fbenchmatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancswallace%2Fbenchmatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancswallace%2Fbenchmatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryancswallace","download_url":"https://codeload.github.com/ryancswallace/benchmatrix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancswallace%2Fbenchmatrix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34716325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","benchmarking","performance","pytest","pytest-benchmark","python"],"created_at":"2026-06-24T03:35:57.191Z","updated_at":"2026-06-24T03:35:57.803Z","avatar_url":"https://github.com/ryancswallace.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchmatrix\n\n[![CI](https://github.com/ryancswallace/benchmatrix/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/ci.yml)\n[![Documentation](https://github.com/ryancswallace/benchmatrix/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/docs.yml)\n[![Docker](https://github.com/ryancswallace/benchmatrix/actions/workflows/docker.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/docker.yml)\n[![CodeQL](https://github.com/ryancswallace/benchmatrix/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/codeql.yml)\n[![OpenSSF Scorecard](https://github.com/ryancswallace/benchmatrix/actions/workflows/scorecard.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/scorecard.yml)\n[![Workflow lint](https://github.com/ryancswallace/benchmatrix/actions/workflows/workflow-lint.yml/badge.svg?branch=main)](https://github.com/ryancswallace/benchmatrix/actions/workflows/workflow-lint.yml)\n[![Python 3.11-3.14](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-3776AB?logo=python\u0026logoColor=white)](https://github.com/ryancswallace/benchmatrix/blob/main/pyproject.toml)\n[![Typed with basedpyright](https://img.shields.io/badge/types-basedpyright-2f6fdd)](https://github.com/DetachHead/basedpyright)\n[![Linted with Ruff](https://img.shields.io/badge/lint-Ruff-46a2f1)](https://docs.astral.sh/ruff/)\n[![Coverage gate: 95%](https://img.shields.io/badge/coverage%20gate-%E2%89%A595%25-2e7d32)](https://github.com/ryancswallace/benchmatrix/blob/main/pyproject.toml)\n[![SBOM: CycloneDX 1.6](https://img.shields.io/badge/SBOM-CycloneDX%201.6-6f42c1)](https://cyclonedx.org/)\n\n**Benchmark matrices for Python projects that need performance data they can\ntrust, compare, and parse.**\n\nbenchmatrix sits on top of\n[pytest-benchmark](https://pytest-benchmark.readthedocs.io/) and adds the layer\nthat benchmark suites usually grow by hand: implementation-by-case matrices,\nstrict JSON-safe metadata, metric-aware result parsing, and concise display of\nsaved benchmark runs.\n\n| Build repeatable suites | Keep metrics honest | Parse saved runs |\n| --- | --- | --- |\n| Generate pytest benchmark tests across implementations, cases, and metric views. | Separate latency, throughput, and local distribution comparisons instead of mixing unlike numbers. | Load benchmatrix-tagged pytest-benchmark JSON rows into structured Python objects. |\n\n## Quick Start\n\nCreate a benchmark matrix from ordinary synchronous callables:\n\n```python\nfrom benchmatrix import BenchmarkCase, make_benchmark_test\n\nimplementations = {\n    \"builtin\": sum,\n    \"loop\": lambda vs: sum(v for v in vs),\n}\n\ncases = [\n    BenchmarkCase.from_values(\n        \"small\",\n        list(range(100)),\n        work_units=100,\n        work_unit_name=\"items\",\n    ),\n]\n\ntest_sum_matrix = make_benchmark_test(implementations, cases)\n```\n\nRun it with pytest-benchmark and keep the machine-readable output:\n\n```bash\nuv run pytest tests/test_sum_benchmark.py --benchmark-json benchmark.json\n```\n\nRead the tagged rows back later:\n\n```python\nfrom benchmatrix import display_benchmark_rows, load_benchmark_json\n\nrows = load_benchmark_json(\"benchmark.json\")\ndisplay_benchmark_rows(rows)\n```\n\n## Why It Exists\n\npytest-benchmark owns timing, calibration, statistics, terminal reporting, and\nJSON export. benchmatrix owns the repeatable structure around those timings.\n\n| Need | benchmatrix gives you |\n| --- | --- |\n| Compare multiple implementations | One generated pytest benchmark matrix instead of repeated parametrization code. |\n| Track what each timing means | JSON-safe invocation metadata with implementation, case, and metric identity. |\n| Report different metric views | Single-call latency, logical-work throughput, and local tail-latency summaries. |\n| Reuse benchmark output | Parsers and display helpers for pytest-benchmark JSON produced by benchmatrix tests. |\n\nbenchmatrix is intentionally narrow: it benchmarks synchronous Python callables.\nIt is not a load-testing framework, production latency monitor, or replacement\nfor pytest-benchmark.\n\n## Install\n\nFor local development from this repository:\n\n```bash\nmake ready\n```\n\nTo install the latest release from PyPI:\n\n```bash\nuv add benchmatrix\n```\n\nor\n\n```bash\npip install benchmatrix\n```\n\n## Documentation\n\nThe documentation source lives under [`docs/`](docs/). The top-level Markdown\nfiles are short project entry points; detailed guides, explanations, references,\nand runbooks live in the MkDocs documentation.\n\n| Start here | Use it for |\n| --- | --- |\n| [First benchmark](docs/tutorials/first-benchmark.md) | A complete first benchmark from test file to parsed JSON. |\n| [Create a benchmark matrix](docs/how-to/create-benchmark-matrix.md) | Cases, work units, fresh inputs, and synchronous target wrappers. |\n| [Parse benchmark results](docs/how-to/parse-results.md) | Loading and displaying benchmatrix-tagged pytest-benchmark JSON. |\n| [Performance model](docs/explanation/performance.md) | What the metrics mean and what they do not prove. |\n| [Development](docs/development.md) | Local setup, test commands, and repository layout. |\n| [Compatibility](docs/reference/compatibility.md) | Supported Python versions, API stability, and support policy. |\n| [Publishing](docs/explanation/publishing.md) | Release artifacts, draft releases, PyPI publishing, and verification. |\n| [Configuration and automation](docs/reference/configuration.md) | Make targets, CI workflows, Docker checks, docs, and SBOM generation. |\n\nThe MkDocs site builds in strict mode and generates API reference pages from the\npackage docstrings.\n\n## Project Links\n\n* [Examples](examples/)\n* [Contributing](CONTRIBUTING.md)\n* [Changelog](CHANGELOG.md)\n* [Security policy](SECURITY.md)\n* [Release policy](RELEASING.md)\n* [Code of conduct](CODE_OF_CONDUCT.md)\n* [Citation metadata](CITATION.cff)\n\n## License\n\nbenchmatrix is distributed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryancswallace%2Fbenchmatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryancswallace%2Fbenchmatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryancswallace%2Fbenchmatrix/lists"}