From 3742ba9b8a1a6ef4f36f0767d619087da17a9fbf Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Thu, 7 Mar 2024 18:36:32 +0100 Subject: [PATCH] Adding benchmark tests Closes #47 --- README.md | 34 ++++++++++++++++++++++++++++++++++ web/backend/run_votes.sh | 3 +-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 635f11808..0daa94363 100644 --- a/README.md +++ b/README.md @@ -658,6 +658,40 @@ go build -ldflags="-X $versionFlag -X $timeFlag" ./cli/dvoting Note that `make build` will do that for you. +# Benchmarks + +For more details, see https://github.com/c4dt/d-voting/issues/47 + +``` ++------------+-------------+--------------+ +I I 1'000 I 10'000 I ++------------+-------------+--------------+ +I CASTING I 95s I 888s I +I I 95ms/vote I 95ms/vote I ++------------+-------------+--------------+ +I Blocks I 179 I 1466 I +I I 5.6/block I 6.8/block I ++------------+-------------+--------------+ +I SHUFFLING I 56s I 542s I ++------------+-------------+--------------+ +I Blocks I 9 I 10 I ++------------+-------------+--------------+ +I DECRYPTING I 5s I 49s I ++------------+-------------+--------------+ +I Blocks I 2 I 3 I ++------------+-------------+--------------+ +I COMBINING I 1s I 47s I ++------------+-------------+--------------+ +I Blocks I 1 I 1 I ++------------+-------------+--------------+ +I DISPLAYING I <1s I 5s I ++------------+-------------+--------------+ + +``` + +- 10'000 votes + - casting: 95s, 179 blocks - 95ms/vote, 5.6 votes / block + --- diff --git a/web/backend/run_votes.sh b/web/backend/run_votes.sh index 3eed435cd..434496642 100755 --- a/web/backend/run_votes.sh +++ b/web/backend/run_votes.sh @@ -6,7 +6,6 @@ fi votes=${2:-120} -cls -ts-node src/cli.ts vote -f https://dvoting.c4dt.org \ +npx ts-node src/cli.ts vote -f https://dvoting.c4dt.org \ -e $1 \ -b $votes -a 111111