Skip to content

Commit 9531774

Browse files
committed
Deploying to gh-pages from @ c35e161 🚀
1 parent 50d05be commit 9531774

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

‎package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sql.js",
3-
"version": "1.12.0",
3+
"version": "1.13.0",
44
"description": "SQLite library with support for opening and writing databases, prepared statements, and more. This SQLite library is in pure javascript (compiled with emscripten).",
55
"keywords": [
66
"sql",

‎test/test_workers.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<pre id="output"></pre>
2+
<p id="instructions">
3+
Run <code>python -m http.server 2255</code>,
4+
then open <a href="http://localhost:2255/test/test_workers.html">this file</a>.
5+
</p>
6+
<script>
7+
for (const dbg of ["-debug", ""]) {
8+
for (const asm of ["-asm", "-wasm"]) {
9+
const url = `../dist/worker.sql${asm}${dbg}.js`;
10+
const start_time = performance.now();
11+
const worker = new Worker(url);
12+
worker.onmessage = (e) => {
13+
output.textContent += `[${url}] [${(performance.now() - start_time).toFixed(2)}ms] ${JSON.stringify(e.data)}\n\n`;
14+
instructions.style.display = "none";
15+
}
16+
worker.onerror = (e) => {
17+
output.textContent += `[error] [${url}] [${(performance.now() - start_time).toFixed(2)}ms] ${JSON.stringify(e)}\n\n`;
18+
}
19+
worker.postMessage({"action": "open", "id": 0});
20+
worker.postMessage({"action": "close", "id": 0});
21+
}
22+
}
23+
</script>

0 commit comments

Comments
 (0)