feat(bench): add safety number & epoch rotation benchmarks, CI workflow
Add safety_number benchmark to crypto_benchmarks.rs, epoch rotation (propose_self_update + commit) benchmark to mls_operations.rs, expand add_member group sizes to include 100, and add .github/workflows/bench.yml that runs Criterion benchmarks and uploads HTML reports as artifacts.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
|
||||
use quicproquo_core::{IdentityKeypair, padding};
|
||||
use quicproquo_core::{compute_safety_number, IdentityKeypair, padding};
|
||||
|
||||
// ── Identity keypair benchmarks ──────────────────────────────────────────────
|
||||
|
||||
@@ -127,6 +127,17 @@ fn bench_padding(c: &mut Criterion) {
|
||||
group.finish();
|
||||
}
|
||||
|
||||
// ── Safety number benchmarks ─────────────────────────────────────────────────
|
||||
|
||||
fn bench_safety_number(c: &mut Criterion) {
|
||||
let key_a = [0x1au8; 32];
|
||||
let key_b = [0x2bu8; 32];
|
||||
|
||||
c.bench_function("safety_number", |b| {
|
||||
b.iter(|| black_box(compute_safety_number(black_box(&key_a), black_box(&key_b))));
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(
|
||||
benches,
|
||||
bench_identity_keygen,
|
||||
@@ -134,5 +145,6 @@ criterion_group!(
|
||||
bench_identity_verify,
|
||||
bench_sealed_sender,
|
||||
bench_padding,
|
||||
bench_safety_number,
|
||||
);
|
||||
criterion_main!(benches);
|
||||
|
||||
Reference in New Issue
Block a user