From 750c6263cc13c0f0e04f6d0be83c8da237b0922c Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 24 Mar 2022 10:00:20 +0000 Subject: ci(bench): bench scripts --- .gitmodules | 3 +++ benches/bench.ps1 | 19 +++++++++++++++++++ benches/ppm-parser | 1 + 3 files changed, 23 insertions(+) create mode 100644 .gitmodules create mode 100644 benches/bench.ps1 create mode 160000 benches/ppm-parser diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8b36103 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "benches/ppm-parser"] + path = benches/ppm-parser + url = https://github.com/Flipnote-Collective/ppm-parser diff --git a/benches/bench.ps1 b/benches/bench.ps1 new file mode 100644 index 0000000..6f123a9 --- /dev/null +++ b/benches/bench.ps1 @@ -0,0 +1,19 @@ +# Frame count: +# - 020FFA_09936E53EA4BC_001.ppm: 44 +# - 022FE6_0987E2DB2322A_003.ppm: 244 + +cargo build --release + +# Feel free to uncomment ppm-parser's benchmark, however, it takes a VERY LONG +# time to complete, especially with three warmup runs. +# +# PPM-Parser Benchmark + (3 * PPM-Parser Warmup Runs) ~ (~50.4 + (3 * ~50.4) +hyperfine --warmup 3 ` + ".\\target\\release\\para .\\benches\\ppm\\022FE6_0987E2DB2322A_003.ppm gif bench.gif" # ` + # "py .\\benches\\ppm-parser\\ppmImage.py .\\benches\\ppm\\022FE6_0987E2DB2322A_003.ppm gif bench.gif" +hyperfine --warmup 3 ` + ".\\target\\release\\para .\\benches\\ppm\\022FE6_0987E2DB2322A_003.ppm 0 bench.png" ` + "py .\\benches\\ppm-parser\\ppmImage.py .\\benches\\ppm\\022FE6_0987E2DB2322A_003.ppm 0 bench.png" + +Remove-Item -ErrorAction Ignore bench.gif +Remove-Item -ErrorAction Ignore bench.png diff --git a/benches/ppm-parser b/benches/ppm-parser new file mode 160000 index 0000000..cfb69f4 --- /dev/null +++ b/benches/ppm-parser @@ -0,0 +1 @@ +Subproject commit cfb69f4b331287d6e21ee6699e0c464e9a4580e1 -- cgit v1.2.3