Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /terrene-foundation_kailash-py /packages /kailash-kaizen /tests /benchmarks /conftest.py
| """ | |
| Shared fixtures and configuration for performance benchmarks. | |
| Requires pytest-benchmark. This conftest is loaded only when running | |
| tests from the benchmarks/ directory. | |
| """ | |
| import pytest | |
| pytest.importorskip( | |
| "pytest_benchmark", reason="pytest-benchmark required for benchmarks" | |
| ) | |
| def pytest_configure(config): | |
| """Configure pytest for benchmarks.""" | |
| config.addinivalue_line( | |
| "markers", "benchmark: mark test as a performance benchmark" | |
| ) | |
| def pytest_benchmark_update_json(config, benchmarks, output_json): | |
| """ | |
| Add custom metadata to benchmark JSON output. | |
| This hook is called by pytest-benchmark to allow customization | |
| of the JSON output. | |
| """ | |
| output_json["environment_info"] = { | |
| "test_mode": "in_memory", | |
| "mocking_policy": "NO_MOCKING", | |
| "isolation": "InMemoryStores", | |
| } | |
| def pytest_benchmark_generate_json(config, benchmarks, include_data): | |
| """ | |
| Generate custom benchmark report data. | |
| This hook allows adding custom data to the benchmark report. | |
| """ | |
| # Add performance targets to each benchmark group | |
| targets = { | |
| "establish": {"p95_ms": 100, "description": "Agent establishment"}, | |
| "delegate": {"p95_ms": 50, "description": "Trust delegation"}, | |
| "verify": { | |
| "quick_p95_ms": 5, | |
| "standard_p95_ms": 50, | |
| "full_p95_ms": 100, | |
| "description": "Trust verification", | |
| }, | |
| "audit": {"p95_ms": 20, "description": "Audit recording"}, | |
| "cache": { | |
| "hit_mean_ms": 1, | |
| "hit_rate_target": 0.85, | |
| "description": "Cache performance", | |
| }, | |
| } | |
| return {"performance_targets": targets} | |
Xet Storage Details
- Size:
- 1.71 kB
- Xet hash:
- 7054af05fa95efe26289d88c8df45c88862aa24fa0bb49ca31813584c97bffb6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.