aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2022-12-28 01:28:50 -0800
committeriximeow <me@iximeow.net>2023-01-02 08:06:57 -0800
commit78b40bb12a265d866b01547924defb10aec283a8 (patch)
tree89dba46c7f484d1bc7edb21242a2a56cd2050473
parent7fc324d5b3aeff76dfe0c460b96f9bb4a1ac09d4 (diff)
do benchmarking in ci too
-rw-r--r--goodfile36
-rw-r--r--rust-toolchain1
2 files changed, 35 insertions, 2 deletions
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