aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tests/opfs/concurrency/worker.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-11-24 17:53:09 +0000
committerstephan <stephan@noemail.net>2022-11-24 17:53:09 +0000
commitdf5d06d03eca407aa84f12fce477a0c210bc4375 (patch)
tree1ee20dc47d06abb4b8b53a3353d5b2887ad09fa8 /ext/wasm/tests/opfs/concurrency/worker.js
parent056a71562f192c7fcd4ca73a3133b60dcf5a83fd (diff)
downloadsqlite-df5d06d03eca407aa84f12fce477a0c210bc4375.tar.gz
sqlite-df5d06d03eca407aa84f12fce477a0c210bc4375.zip
More work on the OPFS concurrency testing app.
FossilOrigin-Name: c0458caca3508d5d252f9b5198bda4f51a5c1874540f014b17e409f2daab1706
Diffstat (limited to 'ext/wasm/tests/opfs/concurrency/worker.js')
-rw-r--r--ext/wasm/tests/opfs/concurrency/worker.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/wasm/tests/opfs/concurrency/worker.js b/ext/wasm/tests/opfs/concurrency/worker.js
index 91aa0fa6f..95fefa195 100644
--- a/ext/wasm/tests/opfs/concurrency/worker.js
+++ b/ext/wasm/tests/opfs/concurrency/worker.js
@@ -46,10 +46,9 @@ self.sqlite3InitModule().then(async function(sqlite3){
}
};
const run = async function(){
- db = new sqlite3.oo1.DB({
+ db = new sqlite3.opfs.OpfsDb({
filename: 'file:'+dbName+'?opfs-unlock-asap='+options.unlockAsap,
- flags: 'c',
- vfs: 'opfs'
+ flags: 'c'
});
sqlite3.capi.sqlite3_busy_timeout(db.pointer, 5000);
db.transaction((db)=>{
@@ -59,7 +58,8 @@ self.sqlite3InitModule().then(async function(sqlite3){
]);
});
- const maxIterations = 10;
+ const maxIterations =
+ urlArgs.has('iterations') ? (+urlArgs.get('iterations') || 10) : 10;
stdout("Starting interval-based db updates with delay of",interval.delay,"ms.");
const doWork = async ()=>{
const tm = new Date().getTime();