Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
45e35c9
f
camillobruni Jun 10, 2026
29a283c
add
camillobruni Jun 10, 2026
d0ba583
add-resources
camillobruni Jun 10, 2026
f4b8259
more-sw-fixes
camillobruni Jun 10, 2026
6a6fe03
pre-format
camillobruni Jun 10, 2026
a7057a4
formatting
camillobruni Jun 10, 2026
1842cf6
formatting
camillobruni Jun 11, 2026
e35d860
f
camillobruni Jun 11, 2026
e77b75f
formatting
camillobruni Jun 11, 2026
1e969f3
Merge branch 'main' into 2026-06-10_worker_preload
camillobruni Jun 15, 2026
8b81a14
wip
camillobruni Jun 15, 2026
476d9fd
cleanup
camillobruni Jun 15, 2026
4ed4753
fx
camillobruni Jun 15, 2026
f66cd92
format
camillobruni Jun 16, 2026
98ae1b8
add-test
camillobruni Jun 16, 2026
0e335d3
Merge branch 'main' into 2026-06-10_worker_preload
camillobruni Jul 7, 2026
aea421a
fix-preload-sync
camillobruni Jul 7, 2026
f7e71b6
fx
camillobruni Jul 7, 2026
48937dc
cleanup
camillobruni Jul 7, 2026
f62f7ce
revert
camillobruni Jul 7, 2026
7d8010e
pre-format
camillobruni Jul 7, 2026
620b7c8
pre-format
camillobruni Jul 7, 2026
b3ea735
wrap
camillobruni Jul 7, 2026
da2841a
pre-format
camillobruni Jul 7, 2026
201c43b
cleanup
camillobruni Jul 7, 2026
90d818f
Fix Chromium Service Worker race condition in e2e tests
camillobruni Jul 7, 2026
7429e21
pre-format
camillobruni Jul 7, 2026
a397584
Throw error for missing resources.txt and switch LockStore to use Ind…
camillobruni Jul 7, 2026
b81afed
Apply formatting fixes for presubmit
camillobruni Jul 7, 2026
3f695ff
formatting
camillobruni Jul 7, 2026
95c603a
Merge branch 'main' into 2026-06-10_worker_preload
camillobruni Jul 15, 2026
4b48443
fix-complexity
camillobruni Jul 16, 2026
39bb731
update
camillobruni Jul 16, 2026
5d82355
Fix Service Worker PRELOAD_PROGRESS flakiness and UI synchronization
camillobruni Jul 16, 2026
8b1ac81
Revert overzealous SW fetch blocking that broke suites-experimental l…
camillobruni Jul 16, 2026
b3deb0d
Wait for active preload to abort and force UI reset when restarting
camillobruni Jul 16, 2026
c95a1e8
Fix fetch interceptor to avoid ERR_FAILED
camillobruni Jul 16, 2026
44b57c7
Set default iterationCount to 2
camillobruni Jul 16, 2026
f2d7e54
Revert default iterationCount
camillobruni Jul 16, 2026
f52913c
Fix ReferenceError for ensureState in sw.mjs
camillobruni Jul 16, 2026
38ad1e8
Fix preload UI synchronization and progress rendering
camillobruni Jul 16, 2026
83bcc5a
Fix auto-kicking of preload when it is disabled and ensure start butt…
camillobruni Jul 16, 2026
8cead72
Fix race conditions in UI progress when restarting preload
camillobruni Jul 16, 2026
fb45482
Fix ESLint errors in main.mjs
camillobruni Jul 16, 2026
70f82c4
fx
camillobruni Jul 16, 2026
d6ade97
fx
camillobruni Jul 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@
</div>
<div class="buttons">
<div class="button-row">
<button class="start-tests-button">Start Test</button>
<button class="start-tests-button"><div>Start Test</div></button>
</div>
<div class="button-row">
<a href="about.html">About Speedometer</a>
<a href="instructions.html">Test Instructions</a>
</div>
</div>
<div id="preload-progress">
<progress aria-label="Progress" id="preload-progress-completed"></progress>
</div>
<div id="preload-info">
<div id="preload-info-label"></div>
<div id="preload-info-progress"></div>
</div>
</section>

<section id="running">
Expand Down
8 changes: 6 additions & 2 deletions resources/benchmark-configurator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export class BenchmarkConfigurator {
this.#suites.forEach((suite) => {
if (!suite.tags)
suite.tags = [];
if (!("measurePrepare" in suite))
suite.measurePrepare = false;
if (suite.url.startsWith("experimental/"))
suite.tags.unshift("all", "experimental");
else
Expand Down Expand Up @@ -115,8 +117,10 @@ export class BenchmarkConfigurator {
}

_loadSuite(suite) {
suite.tags.forEach((tag) => this.#tags.add(tag));
this.#suites.push(suite);
if (suite.tags)
suite.tags.forEach((tag) => this.#tags.add(tag));

this.#suites.push({ ...suite, tags: suite.tags ? [...suite.tags] : [] });
}

enableSuites(names, tags) {
Expand Down
7 changes: 7 additions & 0 deletions resources/developer-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function createDeveloperModeContainer() {
settings.append(createUIForWaitAfterSuite());
settings.append(createUIForAsyncSteps());
settings.append(createUIForLayoutMode());
settings.append(createUIForPreload());
settings.append(createUIForComplexity());

content.append(document.createElement("hr"));
Expand All @@ -54,6 +55,12 @@ function createUIForWarmupSuite() {
});
}

function createUIForPreload() {
return createCheckboxUI("Use service worker for resource preloading", params.preload, (isChecked) => {
params.preload = isChecked;
});
}

function createUIForMeasurePrepare() {
return createCheckboxUI("Measure Prepare", params.measurePrepare, (isChecked) => {
params.measurePrepare = isChecked;
Expand Down
78 changes: 71 additions & 7 deletions resources/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,17 @@ button.show-about {
display: none;
}

#progress {
#preload-progress {
display: none;
}

:root[data-benchmark-state="PRELOADING"] #preload-progress,
:root[data-benchmark-state="PRELOADING"] #preload-info {
display: block;
}

#progress,
#preload-progress {
position: absolute;
bottom: -6px;
left: 60px;
Expand All @@ -429,7 +439,8 @@ button.show-about {
border-right: 6px solid var(--background);
}

#progress-completed {
#progress-completed,
#preload-progress-completed {
position: absolute;
top: 0;
left: 0;
Expand All @@ -440,11 +451,13 @@ button.show-about {
background-color: var(--inactive-color);
}

#progress-completed::-webkit-progress-value {
#progress-completed::-webkit-progress-value,
#preload-progress-completed::-webkit-progress-value {
background-color: var(--foreground);
}

#progress-completed::-moz-progress-bar {
#progress-completed::-moz-progress-bar,
#preload-progress-completed::-moz-progress-bar {
background-color: var(--foreground);
}

Expand All @@ -455,7 +468,9 @@ button.show-about {
background-color: var(--background);
}

#info {
#info,
#preload-info {
display: none;
position: absolute;
bottom: -25px;
left: 60px;
Expand All @@ -465,11 +480,13 @@ button.show-about {
text-align: center;
font-size: 12px;
}
#info-label {
#info-label,
#preload-info-label {
position: absolute;
left: 6px;
}
#info-progress {
#info-progress,
#preload-info-progress {
position: absolute;
right: 6px;
text-align: right;
Expand Down Expand Up @@ -945,3 +962,50 @@ section#about .note {
color: #fff;
stroke: #fff;
}

#preload-progress,
#preload-info {
display: none;
}

[data-benchmark-state="PRELOADING"] {
cursor: wait;
}

[data-benchmark-state="PRELOADING"] #preload-progress,
[data-benchmark-state="PRELOADING"] #preload-info {
display: block;
}

[data-benchmark-state="RUNNING"] #info {
display: block;
}

[data-benchmark-state="PRELOADING"] .start-tests-button {
color: var(--foreground);
background-image: linear-gradient(-45deg, var(--foreground) 3px, transparent 3px, transparent 50%, var(--foreground) 50%, var(--foreground) calc(50% + 3px), transparent calc(50% + 3px), transparent 100%);
background-size: 20px 20px;
animation: barber-pole 1s linear infinite;
pointer-events: none;
}

[data-benchmark-state="PRELOADING"] .developer-mode .start-tests-button {
pointer-events: auto;
cursor: pointer;
}

[data-benchmark-state="PRELOADING"] .start-tests-button > div {
background-color: var(--background);
border-radius: 10px;
padding: 0 0.3em;
display: inline-block;
}

@keyframes barber-pole {
0% {
background-position: 0 0, 0 0;
}
100% {
background-position: 20px 0, 0 0;
}
}
Loading
Loading