1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Add several convenience links to the OPFS VFS concurrency tester app for launching it with various combinations of options.

FossilOrigin-Name: 397d6a18f173a46b60a867fc45611045c76316d6602a3df8b4dc4ba45e1348ce
This commit is contained in:
stephan
2024-07-13 01:40:36 +00:00
parent bdc4ffacec
commit db8939f481
4 changed files with 36 additions and 9 deletions

View File

@ -113,6 +113,31 @@
}
};
/* Set up links to launch this tool with various combinations of
flags... */
const eTestLinks = document.querySelector('#testlinks');
const optArgs = function(obj){
const li = [];
for(const k of ['interval','iterations','workers','verbose','unlock-asap']){
if( obj.hasOwnProperty(k) ) li.push(k+'='+obj[k]);
}
return li.join('&');
};
for(const opt of [
{interval: 1000, workers: 5, iterations: 30},
{interval: 500, workers: 5, iterations: 30},
{interval: 250, workers: 3, iterations: 30},
{interval: 600, workers: 5, iterations: 100}
]){
const li = document.createElement('li');
eTestLinks.appendChild(li);
const a = document.createElement('a');
li.appendChild(a);
const args = optArgs(opt);
a.setAttribute('href', '?'+args);
a.innerText = args;
}
stdout("Launching",options.workerCount,"workers. Options:",options);
workers.uri = (
'worker.js?'