diff --git a/demo/benchmark.html b/demo/benchmark.html index d0e5746..6a6602d 100644 --- a/demo/benchmark.html +++ b/demo/benchmark.html @@ -9,6 +9,10 @@ .tip { font-style: italic; } + + #status { + color: red; + } diff --git a/demo/benchmark.ts b/demo/benchmark.ts index 1754510..2859e8a 100644 --- a/demo/benchmark.ts +++ b/demo/benchmark.ts @@ -101,4 +101,13 @@ function updateCost(id: string) { getElById(id).textContent = `${~~(performance.now() - startTime)}ms`; } +// clear +await file(fileName).remove(); +tx = db.transaction('data', 'readwrite'); +store = tx.objectStore('data'); +for (const k of idbKeys) { + await store.delete(k); +} +await tx.done; + export default {};