From 78b40bb12a265d866b01547924defb10aec283a8 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 28 Dec 2022 01:28:50 -0800 Subject: do benchmarking in ci too --- goodfile | 36 +++++++++++++++++++++++++++++++++++- rust-toolchain | 1 - 2 files changed, 35 insertions(+), 2 deletions(-) delete mode 100644 rust-toolchain diff --git a/goodfile b/goodfile index 2dc9e22..f5e6f09 100644 --- a/goodfile +++ b/goodfile @@ -2,7 +2,7 @@ if not Build.environment.has("rustup") then Build.error("i don't know i want to handle dependencies yet") end -Build.artifact("src/lib.rs") + Build.metric( "nightly version", "rustc --version" @@ -22,3 +22,37 @@ Build.metric( Build.environment.size(sopath) ) Build.artifact(sopath) + +-- now run some perf numbers... +Build.run({"git", "clone", "https://github.com/athre0z/disas-bench.git", "disas-bench"}) +Build.run({"git", "submodule", "update", "--recursive", "--init"}, {cwd="disas-bench"}) +Build.run({"git", "remote", "add", "dev", "../../.."}, {cwd="disas-bench/libs/yaxpeax"}) +Build.run({"git", "fetch", "-a", "dev"}, {cwd="disas-bench/libs/yaxpeax"}) +Build.run({"git", "checkout", Build.sha}, {cwd="disas-bench/libs/yaxpeax"}) +Build.run({"make", "make-bench-yaxpeax"}, {cwd="disas-bench/bench/yaxpeax"}) + +Build.metric( + "bench-yaxpeax-fmt size (bytes)", + Build.environment.size("disas-bench/bench/yaxpeax/bench-yaxpeax-fmt") +) + +Build.metric( + "bench-yaxpeax-no-fmt size (bytes)", + Build.environment.size("disas-bench/bench/yaxpeax/bench-yaxpeax-no-fmt") +) + +-- fmt +bench_start = Build.now_ms() + +Build.run({"./bench-yaxpeax-fmt", "20", "0x400", "0x2460400", "../../input/xul.dll"}, {cwd="disas-bench/bench/yaxpeax"}) + +bench_end = Build.now_ms() +Build.metric("fmt runtime (ms)", bench_end - bench_start) + +-- no-fmt +bench_start = Build.now_ms() + +Build.run({"./bench-yaxpeax-no-fmt", "20", "0x400", "0x2460400", "../../input/xul.dll"}, {cwd="disas-bench/bench/yaxpeax"}) + +bench_end = Build.now_ms() +Build.metric("no-fmt runtime (ms)", bench_end - bench_start) diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 8ee5a62..0000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -nightly-2021-06-05-x86_64-unknown-linux-gnu -- cgit v1.1