Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_ecosystem_benchmark-0.0.4.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

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

ai_ecosystem_benchmark-0.0.4-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file ai_ecosystem_benchmark-0.0.4.tar.gz.

File metadata

  • Download URL: ai_ecosystem_benchmark-0.0.4.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ai_ecosystem_benchmark-0.0.4.tar.gz
Algorithm Hash digest
SHA256 248e3e7038d9b14b67cda50acb2eaeeff8b092977d2d8e4840e749f3e2025ac0
MD5 8729a0e181346c88e4d82b8fce101680
BLAKE2b-256 3a539fa80bf4f6615ba5eb565be81535c1d8442c65aea2dbf9377e0ae1369a77

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_ecosystem_benchmark-0.0.4.tar.gz:

Publisher: release.yml on aerospike-community/ai-ecosystem-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_ecosystem_benchmark-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_ecosystem_benchmark-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66b690e9a72370fc4bb70a2ac6a2a55e8c8a0abbd035b344bf66930c2d2ecdc6
MD5 971aabc262c8c0972a3000f8fea00752
BLAKE2b-256 4dcc2cd5a2bd9e246b22580c8344776e7ccd06e0bf7f6c25ce9379b74a9cec4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_ecosystem_benchmark-0.0.4-py3-none-any.whl:

Publisher: release.yml on aerospike-community/ai-ecosystem-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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