2022-11-21 04:50:52 +01:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en-us">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
|
|
|
|
<link rel="stylesheet" href="../../../common/testing.css"/>
|
|
|
|
<title>sqlite3 OPFS Worker concurrency tester</title>
|
|
|
|
<style>
|
|
|
|
body { display: revert; }
|
|
|
|
body > * {}
|
|
|
|
#test-output {
|
|
|
|
font-family: monospace;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1></h1>
|
|
|
|
<p>
|
|
|
|
OPFS concurrency tester using multiple independent Workers.
|
2022-11-30 04:08:50 +01:00
|
|
|
Disclaimer: concurrency in OPFS is currently a pain point!
|
2022-11-21 06:18:24 +01:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
URL flags: pass a number of workers using
|
2022-11-24 18:53:09 +01:00
|
|
|
the <code>workers=N</code> URL flag. Set the time between each
|
|
|
|
workload with <code>interval=N</code> (milliseconds). Set the
|
|
|
|
number of worker iterations with <code>iterations=N</code>.
|
|
|
|
Enable OPFS VFS verbosity with <code>verbose=1-3</code> (output
|
2023-01-28 06:09:26 +01:00
|
|
|
goes to the dev console). Disable/enable "unlock ASAP" mode
|
|
|
|
(higher concurrency, lower speed) with <code>unlock-asap=0-1</code>.
|
2022-11-21 06:18:24 +01:00
|
|
|
</p>
|
|
|
|
<p>Achtung: if it does not start to do anything within a couple of
|
2022-11-29 06:25:08 +01:00
|
|
|
seconds, check the dev console: Chrome sometimes fails to load
|
|
|
|
the wasm module due to "cannot allocate WasmMemory." Closing and
|
|
|
|
re-opening the tab usually resolves it, but sometimes restarting
|
|
|
|
the browser is required.
|
2022-11-21 04:50:52 +01:00
|
|
|
</p>
|
2024-07-13 03:40:36 +02:00
|
|
|
<p>
|
|
|
|
Links for various testing options: <ul id='testlinks'></ul>
|
|
|
|
</p>
|
2022-11-21 04:50:52 +01:00
|
|
|
<div class='input-wrapper'>
|
|
|
|
<input type='checkbox' id='cb-log-reverse'>
|
|
|
|
<label for='cb-log-reverse'>Reverse log order?</label>
|
|
|
|
</div>
|
|
|
|
<div id='test-output'></div>
|
|
|
|
<script>(function(){
|
|
|
|
document.querySelector('h1').innerHTML =
|
|
|
|
document.querySelector('title').innerHTML;
|
|
|
|
})();</script>
|
|
|
|
<script src="test.js?sqlite3.dir=../../../jswasm"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|