euxis-bench-cpp¶
C++23 benchmark suite — security, autonomy, performance, portability, and interop benchmarks.
README¶
euxis::bench
Benchmark harnesses for euxis: a custom runner that validates against hardcoded SLO targets in CI, and four opt-in Google Benchmark binaries that feed bencher.dev / github-action-benchmark trend dashboards.
Contents¶
Install¶
add_subdirectory(libs/bench)
target_link_libraries(my_app PRIVATE euxis-bench-cpp)
The Google Benchmark binaries are opt-in:
cmake -B build/cmake-build -DEUXIS_BUILD_GBENCH=ON
cmake --build build/cmake-build --target euxis_agent_gbench
Two harnesses, two jobs¶
Harness |
Use for |
Output |
|---|---|---|
Custom ( |
Smoke-testing all 5 suites (autonomy, interop, performance, portability, security) against hardcoded SLO targets in CI. Cheap per-bench cost (fixed wall-clock budget). |
JSON via |
Google Benchmark (4 opt-in binaries) |
Statistical analysis. Auto-tunes iteration count, reports stddev and CV, integrates with bencher.dev / GitHub Actions trend dashboards. |
Standard |
Custom harness¶
#include <iostream>
#include "euxis/bench/runner.hpp"
int main() {
using namespace euxis::bench;
BenchmarkRunner runner;
runner.register_defaults(); // wires the 5 default suites
const auto reports = runner.run_all();
for (const auto& r : reports) {
std::cout << r.suite_name
<< " — passed " << r.passed
<< " / failed " << r.failed << '\n';
}
}
Google Benchmark harnesses¶
Four binaries, one per surface area. Each runs independently and emits bencher.dev-compatible JSON:
Binary |
What it measures |
|---|---|
|
Crypto primitives — AES-GCM (simple + cached schedule), BLAKE2b key derivation, AgentCard msgpack round-trip |
|
SCA parsers, SBOM emission (CycloneDX / SPDX / OpenVEX), DSSE sign/verify, slopsquatting lookup, ScanCache get/put |
|
Agentic core — |
|
Verifier-quorum runner across 1/2/3 verifiers, finding-count Range(16..1024) |
Running¶
./build/cmake-build/libs/bench/euxis_agent_gbench
./build/cmake-build/libs/bench/euxis_agent_gbench --benchmark_filter=BM_ClassifyApproval
./build/cmake-build/libs/bench/euxis_agent_gbench \
--benchmark_format=json \
--benchmark_out=agent-bench.json \
--benchmark_out_format=json
CI integration¶
The JSON output is consumed by github-action-benchmark and by bencher.dev. The .github/workflows/bencher.yml workflow runs all four binaries with --benchmark_min_time=5s, uploads the JSON as workflow artifacts, and pushes to bencher.dev when BENCHER_API_TOKEN is provisioned.
Public surface¶
Header |
What it owns |
|---|---|
|
|
|
|
|
|
Caveat¶
Synthetic microbenchmarks measure library overhead, not user-visible performance. Before optimising a hot path that a bench identifies, profile a real euxis check . invocation (perf record, Instruments, or similar) and confirm the function appears in the production call graph.
License¶
AGPL-3.0-only. See LICENSE.