imas-codex

IMAS Codex Performance Benchmarks

This directory contains the performance benchmarking setup for the IMAS Codex server using ASV (airspeed velocity).

Key Design Principles

Consistent Embedding Usage

This ensures benchmarks measure tool performance, not embedding generation overhead.

Setup

  1. Install benchmark dependencies:

    make install-bench
    # or manually:
    uv sync --extra bench
    asv machine --yes
    
  2. Run performance baseline:

    make performance-baseline
    

Files

Usage

Run all benchmarks

make performance-current
# or:
asv run --python=3.12

Run specific benchmarks

asv run --python=3.12 -b SearchBenchmarks.time_search_imas_basic

Compare performance

make performance-compare
# or:
asv compare HEAD~1 HEAD

Generate HTML report

asv publish
# Results will be in .asv/html/

Benchmark Suites

SearchBenchmarks

ExplainConceptBenchmarks

StructureAnalysisBenchmarks

BulkExportBenchmarks

RelationshipBenchmarks

Performance Targets

Current baseline targets are defined in performance_targets.py:

Integration with CI/CD

The benchmarks can be integrated into GitHub Actions or other CI systems:

- name: Run performance benchmarks
  run: |
    uv sync --extra bench
    asv machine --yes
    asv run --python=3.12
    asv publish

Tips