Framework for benchmarking AI ecosystem tools against database backends
Project description
AI Ecosystem Benchmark
Generalized framework for benchmarking AI tools that depend on database backends.
Python Package
This repository is also a Python package named ai-ecosystem-benchmark. The
package is intentionally minimal for now while the benchmark framework takes
shape.
Install and sync the development environment with uv:
uv sync
Run the local checks:
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run deptry .
Install pre-commit hooks once per checkout:
uv run pre-commit install
Implementing a Workload
Benchmark workloads should subclass BaseBenchmarkWorkload and implement the
required lifecycle hooks:
setup(): prepare clients, data, or other state before benchmarks run.between_benchmarks(): reset or pause between benchmark executions.teardown(): clean up resources after benchmarks finish.
Connection strings are optional. If a connection string is omitted, that backend is assumed to be disabled for the benchmark run.
Backend-specific benchmark methods are discovered by name:
- Aerospike methods start with
aerospike - Postgres methods start with
postgres - Redis methods start with
redis
from ai_ecosystem_benchmark import BaseBenchmarkWorkload
class MyWorkload(BaseBenchmarkWorkload):
def __init__(
self,
aerospike_connection_string: str | None = None,
postgres_connection_string: str | None = None,
redis_connection_string: str | None = None,
) -> None:
super().__init__(
aerospike_connection_string=aerospike_connection_string,
postgres_connection_string=postgres_connection_string,
redis_connection_string=redis_connection_string,
)
def setup(self) -> None:
return None
def between_benchmarks(self) -> None:
return None
def teardown(self) -> None:
return None
def aerospike_test_insert(self) -> None:
...
def redis_test_lookup(self) -> None:
...
Infrastructure
The first infrastructure target is a GCP Compute Terraform stack that can provision any combination of Redis, Postgres, and Aerospike benchmark clusters. The GitHub Actions workflow in .github/workflows/terraform.yml runs Terraform manually through workflow_dispatch and prints non-sensitive endpoint details after apply.
See infra/terraform/gcp-compute/README.md for setup details.
License
This project is licensed under the Apache License 2.0. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
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 ai_ecosystem_benchmark-0.0.1.tar.gz.
File metadata
- Download URL: ai_ecosystem_benchmark-0.0.1.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d336b2738e7c73bf656819ac14c0266d1bc904d79df566bc93caba084f5ce320
|
|
| MD5 |
97c2ea89dcd628eec2afdaebd0402100
|
|
| BLAKE2b-256 |
26cb326335c554955f52013bb799176faa1ca0b4da9b8a349673b884cd7f3154
|
Provenance
The following attestation bundles were made for ai_ecosystem_benchmark-0.0.1.tar.gz:
Publisher:
release.yml on aerospike-community/ai-ecosystem-benchmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_ecosystem_benchmark-0.0.1.tar.gz -
Subject digest:
d336b2738e7c73bf656819ac14c0266d1bc904d79df566bc93caba084f5ce320 - Sigstore transparency entry: 1712072113
- Sigstore integration time:
-
Permalink:
aerospike-community/ai-ecosystem-benchmark@700bf63f50b9e3a2ecbd3ffa1e5a4c1381f275a4 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/aerospike-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@700bf63f50b9e3a2ecbd3ffa1e5a4c1381f275a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ai_ecosystem_benchmark-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ai_ecosystem_benchmark-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6ccf7e74743d0c2757475a70ed5bf8fa06ddd02ba5ec8759b822e051ae59269
|
|
| MD5 |
6245b7f9b38085b9050da1ef8af5150d
|
|
| BLAKE2b-256 |
491c772cdeca5ad38201d28bfdbf8847c9c1ebec0b33370f4caed1934382d521
|
Provenance
The following attestation bundles were made for ai_ecosystem_benchmark-0.0.1-py3-none-any.whl:
Publisher:
release.yml on aerospike-community/ai-ecosystem-benchmark
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_ecosystem_benchmark-0.0.1-py3-none-any.whl -
Subject digest:
e6ccf7e74743d0c2757475a70ed5bf8fa06ddd02ba5ec8759b822e051ae59269 - Sigstore transparency entry: 1712072130
- Sigstore integration time:
-
Permalink:
aerospike-community/ai-ecosystem-benchmark@700bf63f50b9e3a2ecbd3ffa1e5a4c1381f275a4 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/aerospike-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@700bf63f50b9e3a2ecbd3ffa1e5a4c1381f275a4 -
Trigger Event:
push
-
Statement type: