Skip to content

Commit

Permalink
chore: update benchmark results and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mrf345 committed Sep 6, 2024
1 parent db4d316 commit 763e958
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 110 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can find interactive examples of using it as a package to [encrypt](https://

### Performance

With the default settings the encryption should be about **19.5** times faster than `gpgtar` and **10.1** times faster than `7zip`
With the default settings the encryption should be about **18.5** times faster than `gpgtar` and **8.8** times faster than `7zip`

> [!NOTE]
> You can reproduce the results by running [bench_and_plot.py](benchmark/bench_and_plot.py) (based on [Matplotlib](https://github.com/matplotlib/matplotlib) and [Hyperfine](https://github.com/sharkdp/hyperfine))
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bench_and_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
safelock_cmd = "safelock-cli"
pwd = "123456789"
rest = "60s"
input_path = "~/Videos"
input_path = "Videos"
output_name = "test"
output_dir = "safelock_dump"
runs = 3
Expand Down
Binary file modified benchmark/decryption-time.webp
Binary file not shown.
106 changes: 53 additions & 53 deletions benchmark/decryption.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"results": [
{
"command": "echo \"123456789\" | safelock-cli decrypt test.sla safelock_dump --quiet",
"mean": 2.5039628573266666,
"stddev": 0.19691248469553527,
"median": 2.55461392966,
"user": 2.67419198,
"system": 1.8112809399999998,
"min": 2.28667279766,
"max": 2.6706018446599997,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli decrypt test.sla safelock_dump --quiet",
"mean": 2.1050263989333335,
"stddev": 0.06409584697239645,
"median": 2.1340488396,
"user": 2.565836426666667,
"system": 1.86455084,
"min": 2.0315528936000002,
"max": 2.1494774636000002,
"times": [
2.55461392966,
2.6706018446599997,
2.28667279766
2.1494774636000002,
2.1340488396,
2.0315528936000002
],
"exit_codes": [
0,
Expand All @@ -21,18 +21,18 @@
]
},
{
"command": "echo \"123456789\" | safelock-cli decrypt test_sha256.sla safelock_dump --quiet --sha256",
"mean": 2.2569831443266666,
"stddev": 0.30656745930113133,
"median": 2.09402087566,
"user": 2.3718176466666665,
"system": 1.7837292733333332,
"min": 2.0663134356599997,
"max": 2.61061512166,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli decrypt test_sha256.sla safelock_dump --quiet --sha256",
"mean": 1.7911251366,
"stddev": 0.21521963683077622,
"median": 1.7543641936,
"user": 1.9575960933333334,
"system": 1.67062184,
"min": 1.5966536246,
"max": 2.0223575916,
"times": [
2.61061512166,
2.0663134356599997,
2.09402087566
1.7543641936,
2.0223575916,
1.5966536246
],
"exit_codes": [
0,
Expand All @@ -41,18 +41,18 @@
]
},
{
"command": "echo \"123456789\" | safelock-cli decrypt test_sha512.sla safelock_dump --quiet --sha512",
"mean": 2.232521114326666,
"stddev": 0.2060331833574435,
"median": 2.2566013786599997,
"user": 2.687645313333334,
"system": 1.57915894,
"min": 2.01550591466,
"max": 2.4254560496599997,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli decrypt test_sha512.sla safelock_dump --quiet --sha512",
"mean": 2.268577597266667,
"stddev": 0.026547606953880087,
"median": 2.2732154626,
"user": 2.8112754266666666,
"system": 1.9018115066666663,
"min": 2.2400166546,
"max": 2.2925006746000003,
"times": [
2.2566013786599997,
2.01550591466,
2.4254560496599997
2.2732154626,
2.2400166546,
2.2925006746000003
],
"exit_codes": [
0,
Expand All @@ -62,17 +62,17 @@
},
{
"command": "7z e -y -p123456789 -mx1 test.7z -osafelock_dump",
"mean": 19.035598546326668,
"stddev": 1.0811270538832332,
"median": 18.444795690659998,
"user": 20.779736646666663,
"system": 1.4327129399999998,
"min": 18.37860840766,
"max": 20.28339154066,
"mean": 18.642169893266665,
"stddev": 1.1840904020013951,
"median": 17.9893611436,
"user": 20.570662093333336,
"system": 1.4070678399999998,
"min": 17.9281653906,
"max": 20.0089831456,
"times": [
20.28339154066,
18.37860840766,
18.444795690659998
20.0089831456,
17.9281653906,
17.9893611436
],
"exit_codes": [
0,
Expand All @@ -82,17 +82,17 @@
},
{
"command": "gpgtar -d --yes --batch --gpg-args \"--passphrase 123456789\" test.gpg",
"mean": 6.697602776993334,
"stddev": 0.675004732935611,
"median": 6.57798586366,
"user": 0.18233997999999998,
"system": 1.4801756066666665,
"min": 6.090402811660001,
"max": 7.42441965566,
"mean": 5.750362993933334,
"stddev": 0.2899378904750308,
"median": 5.6110951406,
"user": 0.1864430933333333,
"system": 1.3356181733333334,
"min": 5.5563355296,
"max": 6.0836583116,
"times": [
6.090402811660001,
7.42441965566,
6.57798586366
6.0836583116,
5.6110951406,
5.5563355296
],
"exit_codes": [
0,
Expand Down
Binary file modified benchmark/encryption-time.webp
Binary file not shown.
110 changes: 55 additions & 55 deletions benchmark/encryption.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"results": [
{
"command": "echo \"123456789\" | safelock-cli encrypt ~/Videos test.sla --quiet",
"mean": 2.29175750412,
"stddev": 0.38623578747101706,
"median": 2.2869327251200002,
"user": 3.4028373866666666,
"system": 1.3263240666666667,
"min": 1.90795670812,
"max": 2.6803830791200003,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli encrypt Videos test.sla --quiet",
"mean": 2.307632567606667,
"stddev": 0.2723097797445358,
"median": 2.31758881894,
"user": 3.316105306666667,
"system": 1.43377396,
"min": 2.03048120494,
"max": 2.57482767894,
"times": [
2.6803830791200003,
2.2869327251200002,
1.90795670812
2.57482767894,
2.03048120494,
2.31758881894
],
"exit_codes": [
0,
Expand All @@ -21,18 +21,18 @@
]
},
{
"command": "echo \"123456789\" | safelock-cli encrypt ~/Videos test_sha256.sla --quiet --sha256",
"mean": 2.2089183144533338,
"stddev": 0.07374517522754061,
"median": 2.2169794741200004,
"user": 3.6574827199999995,
"system": 1.1812570666666664,
"min": 2.1314737431200004,
"max": 2.27830172612,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli encrypt Videos test_sha256.sla --quiet --sha256",
"mean": 2.3091812516066668,
"stddev": 0.34126317439508236,
"median": 2.23056378494,
"user": 3.660151306666666,
"system": 1.4299016266666664,
"min": 2.01408749594,
"max": 2.68289247394,
"times": [
2.1314737431200004,
2.27830172612,
2.2169794741200004
2.68289247394,
2.23056378494,
2.01408749594
],
"exit_codes": [
0,
Expand All @@ -41,18 +41,18 @@
]
},
{
"command": "echo \"123456789\" | safelock-cli encrypt ~/Videos test_sha512.sla --quiet --sha512",
"mean": 2.27866004312,
"stddev": 0.40925382549422784,
"median": 2.2914522451200003,
"user": 3.7668190533333337,
"system": 1.2321840666666664,
"min": 1.8631600881200001,
"max": 2.68136779612,
"command": "echo \"123456789\" | ~/Projects/safelock-cli/safelock-cli encrypt Videos test_sha512.sla --quiet --sha512",
"mean": 2.2512121786066666,
"stddev": 0.4150328365179191,
"median": 2.27823183994,
"user": 3.4754706400000006,
"system": 1.4172956266666665,
"min": 1.82332967894,
"max": 2.6520750169400005,
"times": [
2.68136779612,
1.8631600881200001,
2.2914522451200003
2.6520750169400005,
2.27823183994,
1.82332967894
],
"exit_codes": [
0,
Expand All @@ -61,18 +61,18 @@
]
},
{
"command": "7z a -p123456789 -mx1 test.7z ~/Videos",
"mean": 22.50626334912,
"stddev": 0.7279365511833463,
"median": 22.76205265512,
"user": 164.54359772,
"system": 1.2068337333333332,
"min": 21.68495648412,
"max": 23.07178090812,
"command": "7z a -p123456789 -mx1 test.7z Videos",
"mean": 20.219332223273334,
"stddev": 0.21725406948835344,
"median": 20.212478717939998,
"user": 138.90269830666668,
"system": 0.97966096,
"min": 20.00558599694,
"max": 20.43993195494,
"times": [
21.68495648412,
23.07178090812,
22.76205265512
20.00558599694,
20.212478717939998,
20.43993195494
],
"exit_codes": [
0,
Expand All @@ -81,18 +81,18 @@
]
},
{
"command": "gpgtar -e -o test.gpg -c --yes --batch --gpg-args \"--passphrase 123456789\" Videos/",
"mean": 43.15427112078667,
"stddev": 1.5830989354414222,
"median": 42.88658979412,
"user": 33.29092905333333,
"system": 9.646163066666666,
"min": 41.72207785412,
"max": 44.85414571412,
"command": "gpgtar -e -o test.gpg -c --yes --batch --gpg-args \"--passphrase 123456789\" Videos",
"mean": 42.574974254606666,
"stddev": 0.8429570446257044,
"median": 42.49198231794,
"user": 32.93103530666667,
"system": 9.175310626666667,
"min": 41.77658282994,
"max": 43.45635761594,
"times": [
41.72207785412,
42.88658979412,
44.85414571412
41.77658282994,
42.49198231794,
43.45635761594
],
"exit_codes": [
0,
Expand Down
Binary file modified benchmark/file-size.webp
Binary file not shown.

0 comments on commit 763e958

Please sign in to comment.