| 1 |
<!doctype html> |
| 2 |
<html lang="en-us"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon"> |
| 7 |
<link rel="stylesheet" href="../../../common/testing.css"/> |
| 8 |
<title>sqlite3 OPFS Worker concurrency tester</title> |
| 9 |
<style> |
| 10 |
body { display: revert; } |
| 11 |
body > * {} |
| 12 |
#test-output { |
| 13 |
font-family: monospace; |
| 14 |
} |
| 15 |
</style> |
| 16 |
</head> |
| 17 |
<body> |
| 18 |
<h1></h1> |
| 19 |
<p> |
| 20 |
OPFS concurrency tester using multiple independent Workers. |
| 21 |
Disclaimer: concurrency in OPFS is currently a pain point! |
| 22 |
</p> |
| 23 |
<p> |
| 24 |
URL flags: pass a number of workers using |
| 25 |
the <code>workers=N</code> URL flag. Set the time between each |
| 26 |
workload with <code>interval=N</code> (milliseconds). Set the |
| 27 |
number of worker iterations with <code>iterations=N</code>. |
| 28 |
Enable OPFS VFS verbosity with <code>verbose=1-3</code> (output |
| 29 |
goes to the dev console). Disable/enable "unlock ASAP" mode |
| 30 |
(higher concurrency, lower speed) with <code>unlock-asap=0-1</code>. |
| 31 |
</p> |
| 32 |
<p>Achtung: if it does not start to do anything within a couple of |
| 33 |
seconds, check the dev console: Chrome sometimes fails to load |
| 34 |
the wasm module due to "cannot allocate WasmMemory." Closing and |
| 35 |
re-opening the tab usually resolves it, but sometimes restarting |
| 36 |
the browser is required. |
| 37 |
</p> |
| 38 |
<div class='input-wrapper'> |
| 39 |
<input type='checkbox' id='cb-log-reverse'> |
| 40 |
<label for='cb-log-reverse'>Reverse log order?</label> |
| 41 |
</div> |
| 42 |
<div id='test-output'></div> |
| 43 |
<script>(function(){ |
| 44 |
document.querySelector('h1').innerHTML = |
| 45 |
document.querySelector('title').innerHTML; |
| 46 |
})();</script> |
| 47 |
<script src="test.js?sqlite3.dir=../../../jswasm"></script> |
| 48 |
</body> |
| 49 |
</html> |