aboutsummaryrefslogtreecommitdiff
path: root/bench/ffi
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-03 02:35:05 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-03 02:35:05 -0700
commite3362a0fdad959a1fe6b87b9449d7aaee2b7175e (patch)
tree4b0fef71ea31e1cb787bebf4ca67188687eb79bb /bench/ffi
parentf0fdda567868124f18e8a54651a7e2a12cd06d4d (diff)
downloadbun-e3362a0fdad959a1fe6b87b9449d7aaee2b7175e.tar.gz
bun-e3362a0fdad959a1fe6b87b9449d7aaee2b7175e.tar.zst
bun-e3362a0fdad959a1fe6b87b9449d7aaee2b7175e.zip
clarify
Diffstat (limited to 'bench/ffi')
-rw-r--r--bench/ffi/plus100/plus100.bun.js4
-rw-r--r--bench/ffi/plus100/plus100.deno.js4
-rw-r--r--bench/ffi/plus100/plus100.napi.mjs4
3 files changed, 12 insertions, 0 deletions
diff --git a/bench/ffi/plus100/plus100.bun.js b/bench/ffi/plus100/plus100.bun.js
index 3ddaff975..3eb4de02e 100644
--- a/bench/ffi/plus100/plus100.bun.js
+++ b/bench/ffi/plus100/plus100.bun.js
@@ -28,3 +28,7 @@ bench("noop() ", () => {
// prevents gc and can help with jit optimizing out functions
await run({ collect: false, percentiles: true });
console.log("\n");
+
+if (plus100(1) !== 101) {
+ throw new Error("plus100(1) !== 101");
+}
diff --git a/bench/ffi/plus100/plus100.deno.js b/bench/ffi/plus100/plus100.deno.js
index 83e4fc317..ec58a8b64 100644
--- a/bench/ffi/plus100/plus100.deno.js
+++ b/bench/ffi/plus100/plus100.deno.js
@@ -24,3 +24,7 @@ bench("noop() ", () => {
// collect option collects benchmark returned values into array
// prevents gc and can help with jit optimizing out functions
await run({ collect: false, percentiles: true });
+
+if (plus100(1) !== 101) {
+ throw new Error("plus100(1) !== 101");
+}
diff --git a/bench/ffi/plus100/plus100.napi.mjs b/bench/ffi/plus100/plus100.napi.mjs
index aa8d2636f..2b3015933 100644
--- a/bench/ffi/plus100/plus100.napi.mjs
+++ b/bench/ffi/plus100/plus100.napi.mjs
@@ -14,3 +14,7 @@ bench("noop() ", () => {
});
await run({ collect: false, percentiles: true });
console.log("\n");
+
+if (plus100(1) !== 101) {
+ throw new Error("plus100(1) !== 101");
+}