-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Nova Public Parameter benchmark for SDK
Summary: Test Plan:
- Loading branch information
duc-nx
committed
Aug 20, 2024
1 parent
02dc248
commit 0c50e81
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
use nexus_sdk::{nova, Parameters}; | ||
|
||
fn nova_public_parameter_generation() { | ||
nova::seq::PP::generate_for_testing().expect("Failed to generate Nova public parameters"); | ||
} | ||
|
||
#[allow(clippy::redundant_closure)] | ||
fn bench_nova_public_parameter(c: &mut Criterion) { | ||
c.bench_function("nova_public_parameter", |b| { | ||
b.iter(|| nova_public_parameter_generation()) | ||
}); | ||
} | ||
|
||
criterion_group!( | ||
name = benches; | ||
config = Criterion::default().significance_level(0.1).sample_size(10); | ||
targets = bench_nova_public_parameter); | ||
|
||
criterion_main!(benches); |