From 3398bbaec4e92c6ff9b38883a85895871ac2025d Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Wed, 11 Dec 2024 13:52:59 +0100 Subject: [PATCH 1/2] don't run benchmarks in regular build --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index e5170f6741..08ec737c75 100644 --- a/flake.nix +++ b/flake.nix @@ -152,11 +152,11 @@ parallel-crypto3-gcc = (pkgs.callPackage ./parallel-crypto3.nix { runTests = true; enableDebug = false; - benchmarkTests = true; }); parallel-crypto3-gcc-bench = (pkgs.callPackage ./parallel-crypto3.nix { runTests = true; enableDebug = false; + benchmarkTests = true; }); parallel-crypto3-clang = (pkgs.callPackage ./parallel-crypto3.nix { stdenv = pkgs.llvmPackages_19.stdenv; From 0b33a829eb3aebc86dedc6addafe01430587c703 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Wed, 11 Dec 2024 14:53:51 +0100 Subject: [PATCH 2/2] reduce iteration count in a bench test --- parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp b/parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp index db7e056a1b..4abf14c727 100644 --- a/parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp +++ b/parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp @@ -153,7 +153,7 @@ BENCHMARK_AUTO_TEST_CASE(dummy_test, 100) { STOP_TIMER("dummy") } -BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 20) { +BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 10) { using Field = nil::crypto3::algebra::fields::bls12_fr<381>; std::vector> random_polynomials; @@ -174,7 +174,7 @@ BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 20) { STOP_TIMER("polynomial_product") } -BENCHMARK_AUTO_TEST_CASE(polynomial_sum_real_test, 20) { +BENCHMARK_AUTO_TEST_CASE(polynomial_sum_real_test, 10) { using Field = nil::crypto3::algebra::fields::bls12_fr<381>; std::vector> random_polynomials;