diff options
author | stephan <stephan@noemail.net> | 2022-09-16 02:30:49 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-09-16 02:30:49 +0000 |
commit | 57db2174d53b713d3bdeb38fa05d9eb1580ee9c0 (patch) | |
tree | 707ced3312ff1c5514b48c4ee8d0874f1b62e5d7 /ext/wasm/batch-runner.js | |
parent | 58bcfe075dcaf4bc94f7f1d56ce3a4b3ed230e22 (diff) | |
download | sqlite-57db2174d53b713d3bdeb38fa05d9eb1580ee9c0.tar.gz sqlite-57db2174d53b713d3bdeb38fa05d9eb1580ee9c0.zip |
Add batch-runner-kvvfs.html, a kvvfs-specific build of batch-runner.html. Reduce the speedtest1 --size X value for the batch list generation to 5 so that the kvvfs batch runner can handle it.
FossilOrigin-Name: d8df25920a047d5cf2093cc6233128c5e6057a9104d0c4397e643645bd646fe1
Diffstat (limited to 'ext/wasm/batch-runner.js')
-rw-r--r-- | ext/wasm/batch-runner.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/ext/wasm/batch-runner.js b/ext/wasm/batch-runner.js index 9964d747c..7a90ddd13 100644 --- a/ext/wasm/batch-runner.js +++ b/ext/wasm/batch-runner.js @@ -356,17 +356,24 @@ this.logHtml("Loaded module:",capi.sqlite3_libversion(), capi.sqlite3_sourceid()); this.logHtml("WASM heap size =",wasm.heap8().length); this.loadSqlList(); - const pDir = 1 ? '' : capi.sqlite3_web_persistent_dir(); - const dbFile = pDir ? pDir+"/speedtest.db" : ( - sqlite3.capi.sqlite3_vfs_find('kvvfs') ? 'local' : ':memory:' - ); - this.clearStorage(); - if(pDir){ - logHtml("Using persistent storage:",dbFile); + let pDir, dbFile; + if(sqlite3.capi.sqlite3_vfs_find('kvvfs')){ + dbFile = 1 ? 'local' : 'session'; + this.logHtml("Using KVVFS storage:",dbFile); }else{ + pDir = capi.sqlite3_web_persistent_dir(); + if(pDir){ + dbFile = pDir+"/speedtest.db"; + this.logHtml("Using persistent storage:",dbFile); + }else{ + dbFile = ':memory:'; + this.logHtml("Using",dbFile,"storage."); + } + } + if(!pDir){ document.querySelector('#warn-opfs').remove(); } - this.openDb(dbFile, !!pDir); + this.openDb(dbFile, true); const who = this; const eReverseLogNotice = document.querySelector('#reverse-log-notice'); if(this.e.cbReverseLog.checked){ |