// CRP-1176: Loading the NI-DKG transcript for all nodes in such a large subnet
// takes too long.
//fn bench_threshold_sig_100_nodes_threshold_34(criterion: &mut Criterion) {
//    let group = &mut
// criterion.benchmark_group("crypto_threshold_sig_100_nodes_threshold_34");
//    group.sample_size(25);
//    group.measurement_time(Duration::from_secs(14));
//    bench_threshold_sig_n_nodes(group, 100, 34);
//}
CRP-1176: Loading the NI-DKG transcript for all nodes in such a large subnet
takes too long.
CRP - 1176 : Loading the NI - DKG transcript for all nodes in such a large subnet takes too long .
fn bench_threshold_sig_n_nodes<M: Measurement>(
    group: &mut BenchmarkGroup<'_, M>,
    num_of_nodes_in_subnet: usize,
    threshold: Threshold,
) {
    let dkg_tag = dkg_tag(num_of_nodes_in_subnet, threshold);
    let config = RandomNiDkgConfig::builder()
        .dkg_tag(dkg_tag)
        .subnet_size(num_of_nodes_in_subnet)
        .build();
    let env = NiDkgTestEnvironment::new_for_config(config.get());
    let nodes_in_subnet: Vec<_> = config.receiver_ids().iter().copied().collect();
    let transcript = run_ni_dkg_and_create_single_transcript(config.get(), &env.crypto_components);
    for &node_id in &nodes_in_subnet {
        load_transcript(&transcript, &env.crypto_components, node_id);
    }
    let dkg_id = transcript.dkg_id;
    bench_threshold_sign(group, &nodes_in_subnet, &env.crypto_components, dkg_id);
    bench_verify_threshold_sig_share_excl_loading_pubkey(
        group,
        &nodes_in_subnet,
        &env.crypto_components,
        dkg_id,
    );
    bench_verify_threshold_sig_share_incl_loading_pubkey(
        group,
        &nodes_in_subnet,
        &env.crypto_components,
        dkg_id,
        &transcript,
    );
    let threshold_many_random_subnet_nodes = random_nodes(&nodes_in_subnet, threshold);
    bench_combine_threshold_sig_shares(
        group,
        &threshold_many_random_subnet_nodes,
        &env.crypto_components,
        dkg_id,
    );
    bench_verify_threshold_sig_combined(
        group,
        &threshold_many_random_subnet_nodes,
        &env.crypto_components,
        dkg_id,
    );
}
fn bench_threshold_sig_n_nodes < M : Measurement > ( group : & mut BenchmarkGroup < ' _ , M > , num_of_nodes_in_subnet : usize , threshold : Threshold , ) { let dkg_tag = dkg_tag ( num_of_nodes_in_subnet , threshold ) ; let config = RandomNiDkgConfig :: builder ( ) . dkg_tag ( dkg_tag ) . subnet_size ( num_of_nodes_in_subnet ) . build ( ) ; let env = NiDkgTestEnvironment :: new_for_config ( config . get ( ) ) ; let nodes_in_subnet : Vec < _ > = config . receiver_ids ( ) . iter ( ) . copied ( ) . collect ( ) ; let transcript = run_ni_dkg_and_create_single_transcript ( config . get ( ) , & env . crypto_components ) ; for & node_id in & nodes_in_subnet { load_transcript ( & transcript , & env . crypto_components , node_id ) ; } let dkg_id = transcript . dkg_id ; bench_threshold_sign ( group , & nodes_in_subnet , & env . crypto_components , dkg_id ) ; bench_verify_threshold_sig_share_excl_loading_pubkey ( group , & nodes_in_subnet , & env . crypto_components , dkg_id , ) ; bench_verify_threshold_sig_share_incl_loading_pubkey ( group , & nodes_in_subnet , & env . crypto_components , dkg_id , & transcript , ) ; let threshold_many_random_subnet_nodes = random_nodes ( & nodes_in_subnet , threshold ) ; bench_combine_threshold_sig_shares ( group , & threshold_many_random_subnet_nodes , & env . crypto_components , dkg_id , ) ; bench_verify_threshold_sig_combined ( group , & threshold_many_random_subnet_nodes , & env . crypto_components , dkg_id , ) ; }
CRP-1176: Loading the NI-DKG transcript for all nodes in such a large subnet
takes too long.
CRP - 1176 : Loading the NI - DKG transcript for all nodes in such a large subnet takes too long .
group
&mut BenchmarkGroup<'_, M>
num_of_nodes_in_subnet
usize
threshold
Threshold