Skip to content

Commit 7c380ee

Browse files
committed
Merge branch 'main' of github.com:danleh/JetStream into zlib-wasm
2 parents 495e388 + 0260caf commit 7c380ee

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

JetStreamDriver.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,7 @@ const BENCHMARKS = [
19501950
preload: {
19511951
wasmBinary: "./wasm/HashSet/build/HashSet.wasm"
19521952
},
1953+
iterations: 50,
19531954
testGroup: WasmGroup
19541955
}),
19551956
new WasmEMCCBenchmark({
@@ -1961,8 +1962,7 @@ const BENCHMARKS = [
19611962
preload: {
19621963
wasmBinary: "./wasm/TSF/build/tsf.wasm"
19631964
},
1964-
iterations: 15,
1965-
worstCaseCount: 2,
1965+
iterations: 50,
19661966
testGroup: WasmGroup
19671967
}),
19681968
new WasmEMCCBenchmark({
@@ -1998,8 +1998,7 @@ const BENCHMARKS = [
19981998
preload: {
19991999
wasmBinary: "./wasm/richards/build/richards.wasm"
20002000
},
2001-
iterations: 20,
2002-
worstCaseCount: 2,
2001+
iterations: 50,
20032002
testGroup: WasmGroup
20042003
}),
20052004
new WasmEMCCBenchmark({
@@ -2011,7 +2010,7 @@ const BENCHMARKS = [
20112010
preload: {
20122011
wasmBinary: "./sqlite3/build/jswasm/speedtest1.wasm"
20132012
},
2014-
iterations: 15,
2013+
iterations: 30,
20152014
worstCaseCount: 2,
20162015
testGroup: WasmGroup
20172016
}),

sqlite3/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Benchmark {
8585
//"--memdb", // note that memdb trumps the filename arg
8686
"--nomemstat",
8787
"--big-transactions" /*important for tests 410 and 510!*/,
88-
"--size", "10", // To speedup, default is 100 (and takes about 4s).
88+
"--size", "2", // To speedup, default is 100 (and takes about 4s).
8989
"--vfs", vfs, // See VFS comment above.
9090
];
9191

tests/run.mjs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,27 @@ async function testEnd2End() {
8383
try {
8484
await driver.get(`http://localhost:${PORT}/index.html?worstCaseCount=2&iterationCount=3`);
8585
await driver.executeAsyncScript((callback) => {
86-
globalThis.addEventListener("JetStreamReady", callback);
86+
// callback() is explicitly called without the default event
87+
// as argument to avoid serialization issues with chromedriver.
88+
globalThis.addEventListener("JetStreamReady", () => callback());
8789
// We might not get a chance to install the on-ready listener, thus
8890
// we also check if the runner is ready synchronously.
8991
if (globalThis?.JetStream?.isReady)
9092
callback()
9193
});
92-
await driver.manage().setTimeouts({ script: 60_000 });
94+
await driver.manage().setTimeouts({ script: 3 * 60_000 });
9395
results = await driver.executeAsyncScript((callback) => {
9496
globalThis.addEventListener("JetStreamDone", event => callback(event.detail));
9597
JetStream.start();
9698
});
97-
} finally {
98-
console.log("\nTests complete!");
99+
console.log("\n✅ Tests completed!");
100+
console.log("RESULTS:")
99101
console.log(results)
102+
} catch(e) {
103+
console.error("\n❌ Tests failed!");
104+
console.error(e);
105+
throw e;
106+
} finally {
100107
driver.quit();
101108
server.close();
102109
}

wasm/TSF/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ class Benchmark {
2828
if (!Module._runIteration)
2929
await setupModule(Module);
3030

31-
Module._runIteration(150);
31+
Module._runIteration(50);
3232
}
3333
};

wasm/richards/build.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Built on 2025-01-20T14:41:13Z
1+
Built on 2025-01-29T18:38:57Z
22
Toolchain versions
33
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.73 (ac676d5e437525d15df5fd46bc2c208ec6d376a3)
44
Building...

wasm/richards/build/richards.wasm

-1 Bytes
Binary file not shown.

wasm/richards/richards.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#include <stdlib.h>
1717

1818
#if 1
19-
#define Count 10000*100
20-
#define Qpktcountval 2326410
21-
#define Holdcountval 930563
19+
#define Count 200000
20+
#define Qpktcountval 465212
21+
#define Holdcountval 186084
2222
#endif
2323

2424
#define TRUE 1

0 commit comments

Comments
 (0)