We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent8fa6fec commitc203d45Copy full SHA for c203d45
test/test_workers.html
@@ -0,0 +1,23 @@
1
+<preid="output"></pre>
2
+<pid="instructions">
3
+ Run<code>python -m http.server 2255</code>,
4
+ then open<ahref="http://localhost:2255/test/test_workers.html">this file</a>.
5
+</p>
6
+<script>
7
+for(constdbgof["-debug",""]){
8
+for(constasmof["-asm","-wasm"]){
9
+consturl=`../dist/worker.sql${asm}${dbg}.js`;
10
+conststart_time=performance.now();
11
+constworker=newWorker(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>