Skip to content

Commit

Permalink
Benches/CentralizedTelescope: Adding proving size bench
Browse files Browse the repository at this point in the history
  • Loading branch information
rrtoledo committed Jan 21, 2025
1 parent c7ec055 commit 2c0111d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ name = "centralized_number_steps"
harness = false
path = "benches/centralized_telescope/number_steps.rs"

[[bench]]
name = "centralized_proof_size"
harness = false
path = "benches/centralized_telescope/proof_size.rs"

[lints.rust]
missing-copy-implementations = "warn"
Expand Down
41 changes: 41 additions & 0 deletions benches/centralized_telescope/proof_size.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//! Benchmarking the proof size of the Centralized Telescope scheme
use alba::centralized_telescope::params::Params;

mod utils;
use utils::common::{
criterion_helpers::centralized::BenchParam, test_vectors::centralized::ALL_TESTS,
};

/// Function benchmarking the proof size
fn proof_bench(params: &[BenchParam]) {
println!("Centralized telescope -- proof size");
println!(
"{0: <23} | {1: <26} | {2: <14} | {3: <17} | {4: <14}",
"soundness_param (λ_sec)",
"completeness_param (λ_rel)",
"set_size (n_p)",
"lower_bound (n_f)",
"proof_size (u)"
);
for param in params {
let parameters = Params::new(
param.lambda_sec,
param.lambda_rel,
param.set_size,
param.lower_bound,
);
println!(
"{0: <23} | {1: <26} | {2: <14} | {3: <17} | {4: <14}",
param.lambda_sec,
param.lambda_rel,
param.set_size,
param.lower_bound,
parameters.proof_size
);
}
}

fn main() {
proof_bench(ALL_TESTS);
}

0 comments on commit 2c0111d

Please sign in to comment.