Files
FusionAGI/tests/test_benchmarks.py
defiQUG c052b07662
Some checks failed
Tests / test (3.10) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.12) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:42 -08:00

28 lines
802 B
Python

"""Latency benchmarks for Dvādaśa components."""
import time
from fusionagi.multi_agent import run_consensus
from fusionagi.schemas.head import HeadOutput, HeadId, HeadClaim
def test_consensus_engine_latency():
"""Assert consensus engine completes in reasonable time."""
outputs = [
HeadOutput(
head_id=HeadId.LOGIC,
summary="S",
claims=[HeadClaim(claim_text="X is true", confidence=0.8, evidence=[], assumptions=[])],
risks=[],
questions=[],
recommended_actions=[],
tone_guidance="",
)
for _ in range(5)
]
start = time.monotonic()
result = run_consensus(outputs)
elapsed = time.monotonic() - start
assert result.confidence_score >= 0
assert elapsed < 1.0