mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-10 07:08:03 -05:00
chore(bench): measure proof size for zk benchmarks
Also clean key sizes measurements since they are now done in shortint_key_sizes.rs Co-authored-by: David Testé <david.teste@zama.ai>
This commit is contained in:
@@ -146,6 +146,9 @@ fn pke_zk_verify(c: &mut Criterion, results_file: &Path) {
|
||||
public_params
|
||||
.serialize_with_mode(&mut crs_data, Compress::No)
|
||||
.unwrap();
|
||||
|
||||
println!("CRS size: {}", crs_data.len());
|
||||
|
||||
let test_name = format!("zk::crs_sizes::{param_name}_{bits}_bits_packed");
|
||||
|
||||
write_result(&mut file, &test_name, crs_data.len());
|
||||
@@ -178,6 +181,24 @@ fn pke_zk_verify(c: &mut Criterion, results_file: &Path) {
|
||||
.build_with_proof_packed(public_params, compute_load)
|
||||
.unwrap();
|
||||
|
||||
let proof_serialized = bincode::serialize(&ct1).unwrap();
|
||||
|
||||
println!("proof size: {}", proof_serialized.len());
|
||||
|
||||
let test_name =
|
||||
format!("zk::proof_sizes::{param_name}_{bits}_bits_packed_{zk_load}");
|
||||
|
||||
write_result(&mut file, &test_name, proof_serialized.len());
|
||||
write_to_json::<u64, _>(
|
||||
&test_name,
|
||||
shortint_params,
|
||||
param_name,
|
||||
"pke_zk_proof",
|
||||
&OperatorType::Atomic,
|
||||
0,
|
||||
vec![],
|
||||
);
|
||||
|
||||
bench_group.bench_function(&bench_id_verify, |b| {
|
||||
b.iter(|| {
|
||||
let _ret = ct1.verify(public_params, &pk);
|
||||
|
||||
Reference in New Issue
Block a user