blob: e4ab9fee269ef430f9a0358012bfb8a85a34cc7a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src='../resources/runner.js'></script>
</head>
<body>
<script>
function runTest() {
navigator.serviceWorker.addEventListener('message', (msg) => {
PerfTestRunner.recordResultFromWorker(msg.data);
});
const script =
'/service_worker/resources/cache-open-add-delete-10K-service-worker.js';
const scope = '/service_worker/resources/';
navigator.serviceWorker.register(script, { scope: scope }).catch((error) => {
PerfTestRunner.logFatalError(
'Failed to register service worker script:' + script);
});
return;
}
PerfTestRunner.startMeasureValuesInWorker({
description: 'Measure performance of open, add and delete operations of' +
'cache with 10K sized file',
unit: 'runs/s',
run: runTest,
});
</script>
</body>
</html>