Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in the end2end client benchmark code #78

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions end2end-example/client/benches/client_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use criterion::{criterion_group, criterion_main, Criterion};

use acl::verify::SigVerify;
use ark_ec::models::CurveConfig;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use boomerang::{
client::{CollectionC, IssuanceC, SpendVerifyC, UKeyPair},
Expand All @@ -14,8 +13,6 @@ use t256::Config; // use arksecp256r1

use tokio::task;

type SF = <Config as CurveConfig>::ScalarField;

static SERVER_ENDPOINT: &str = "localhost:8080"; //"52.11.217.156:8080";//

// functions to benchmark
Expand Down Expand Up @@ -59,7 +56,7 @@ async fn issuance_protocol(ckp: UKeyPair<Config>, skp: ServerKeyPair<Config>) ->
let check = SigVerify::<Config>::verify(
skp.s_key_pair.verifying_key,
skp.s_key_pair.tag_key,
&sig,
sig,
"message",
);
assert!(check);
Expand Down Expand Up @@ -114,7 +111,7 @@ async fn collection_protocol(
let check = SigVerify::<Config>::verify(
skp.s_key_pair.verifying_key,
skp.s_key_pair.tag_key,
&sig_n,
sig_n,
"message",
);
assert!(check);
Expand Down Expand Up @@ -174,7 +171,7 @@ async fn spending_protocol(
let check = SigVerify::<Config>::verify(
skp.s_key_pair.verifying_key,
skp.s_key_pair.tag_key,
&sig_n,
sig_n,
"message",
);
assert!(check);
Expand Down Expand Up @@ -444,9 +441,10 @@ fn benchmark_boomerang_mult_users(c: &mut Criterion) {
let number_of_users = 2;

// customize sample count
let mut c_custom = Criterion::default().sample_size(10);
let mut group = c.benchmark_group("minimum-sample-size");
group.sample_size(10);

c_custom.bench_function("boomerang-mult-user", |b| {
group.bench_function("boomerang-mult-user", |b| {
b.to_async(&rt).iter(|| async {
// Simulate multiple users by spawning multiple tasks
let tasks: Vec<_> = (0..number_of_users)
Expand Down
Loading