benchmark scripts

This commit is contained in:
pGerhart 2025-09-11 10:39:21 -04:00
parent f7da97c896
commit 7add711e05
4 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,4 @@
ab -k -n 2000 -c 64 \
-p decrypt_request.json -T application/json \
http://127.0.0.1:8000/decrypt \
> ab_decrypt.txt

View File

@ -0,0 +1,4 @@
ab -k -n 200 -c 64 \
-p encrypt.json -T application/json \
http://127.0.0.1:8000/encrypt \
> ab_encrypt.txt

View File

@ -0,0 +1,8 @@
curl -sS http://127.0.0.1:8000/encrypt \
-H "Content-Type: application/json" \
--data-binary @encrypt.json \
| jq -n --argfile ciphertext /dev/stdin \
--arg u "alice" \
--arg p "correct horse battery staple" \
'{username:$u, password:$p, ciphertext:$ciphertext}' \
> decrypt_request.json

View File

@ -2,8 +2,8 @@
"username": "alice",
"password": "correct horse battery staple",
"ciphertext": {
"c1": "XTLVdSI41jrdYZoy3yMObpUa6ZKE2p7eXEJyxNJGupq92ArGpIKZAIrHj0W69MNuaZDOXYQ4rNNetwaPfRKoYw==",
"c2": "W/3NHpAN07IlktQgc8vTGPtSDUkqm2RJqH+ovtRbbRmeTOSqDelzshZPLubeeiiBWZ2eYqcwhyvBGq4zN77lFw==",
"n": "KPeQdFyKETghj/5qj70MkSTD1rQ6TLcFiprzTnA+xwo="
"c1": "0vfnHCz6t0/R5okIAorA7T20lgjpjO8/f8QDGXuICGV73lAL5NSbZcGEQE2mxTMCXYZdDYIdOYBEikSBvNFPbg==",
"c2": "vrT0ECeHsn20CtnjnqhcYQv44hzihdNsmtZ+XU9urxKz3EMPeYZtHc61ucBPb/rq8co9hRyjYfZrBaWyFBlSxQ==",
"n": "ec4lhew4AdybrXXmEhOW1uggPm2oqc2bVQzKUsuZhD0="
}
}