Skip to content

Commit

Permalink
Change the printWidth configuration to 120 characters
Browse files Browse the repository at this point in the history
Fixes #370
  • Loading branch information
julienw committed Mar 5, 2024
1 parent ffd44d7 commit ec73337
Show file tree
Hide file tree
Showing 88 changed files with 1,777 additions and 502 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"printWidth": 250,
"printWidth": 120,
"tabWidth": 4
}
129 changes: 92 additions & 37 deletions about.html

Large diffs are not rendered by default.

39 changes: 31 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@
<div class="version">3.0</div>
</a>
<div class="content">
<p>Speedometer is a browser benchmark that measures the responsiveness of Web applications. It uses demo web applications to simulate user actions such as adding to-do items.</p>
<p>
Speedometer is a browser benchmark that measures the responsiveness of Web applications. It uses
demo web applications to simulate user actions such as adding to-do items.
</p>
<p id="screen-size-warning">
<strong>
Your browser window is too small. For most accurate results, please make the view port size at least <span id="min-screen-width">850px</span> by <span id="min-screen-height">650px</span>.<br />
Your browser window is too small. For most accurate results, please make the view port size
at least <span id="min-screen-width">850px</span> by
<span id="min-screen-height">650px</span>.<br />
It's currently <span id="screen-size"></span>.
</strong>
</p>
Expand Down Expand Up @@ -64,7 +69,9 @@ <h1>Score</h1>
<div id="confidence-number"></div>
<div class="buttons">
<div class="button-row">
<a class="button" href="#details" id="show-details" title="Show detailed results data.">Details</a>
<a class="button" href="#details" id="show-details" title="Show detailed results data."
>Details</a
>
</div>
</div>
</section>
Expand All @@ -89,13 +96,29 @@ <h2>Detailed Metrics</h2>
</div>
<div class="buttons section-footer">
<div class="button-row">
<a class="button" href="#summary" title="Go back to the simplified summary view.">Summary</a>
<a class="button" href="#summary" title="Go back to the simplified summary view."
>Summary</a
>
</div>
<div class="button-row export-buttons">
<button id="copy-full-json" title="Copy full result metrics as json string.">Copy JSON</button>
<a class="button" id="download-full-json" title="Download full result metrics as json string.">Download JSON</a>
<a class="button" id="download-classic-json" title="Download backwards-compatible result metrics as json string.">Download Classic JSON</a>
<a class="button" id="download-csv" title="Download all result metrics as CSV string.">Download CSV</a>
<button id="copy-full-json" title="Copy full result metrics as json string.">
Copy JSON
</button>
<a
class="button"
id="download-full-json"
title="Download full result metrics as json string."
>Download JSON</a
>
<a
class="button"
id="download-classic-json"
title="Download backwards-compatible result metrics as json string."
>Download Classic JSON</a
>
<a class="button" id="download-csv" title="Download all result metrics as CSV string."
>Download CSV</a
>
<button id="copy-csv" title="Copy all result metrics as CSV string.">Copy CSV</button>
</div>
</div>
Expand Down
15 changes: 12 additions & 3 deletions instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@
<div class="section-grid">
<h1 class="section-header">Speedometer 3 General Instructions</h1>
<div class="section-content">
<p>To get reasonably accurate results your device and browser need to be focused on the benchmark. Here are some basic instructions to allow that:</p>
<p>
To get reasonably accurate results your device and browser need to be focused on the
benchmark. Here are some basic instructions to allow that:
</p>
<ul class="compact">
<li>Ensure you are running the latest stable browser version.</li>
<li>Prefer using a separate clean browser profile — extensions and non-default browser settings can have a large impact on the score.</li>
<li>
Prefer using a separate clean browser profile — extensions and non-default browser
settings can have a large impact on the score.
</li>
<li>Don't run any programs in the background.</li>
<li>Restart the browser and close all other tabs and windows.</li>
<li>Keep the Speedometer page focused and do not interact with the device while running the benchmark.</li>
<li>
Keep the Speedometer page focused and do not interact with the device while running the
benchmark.
</li>
<li>Keep your battery-powered device plugged into a charger.</li>
<li>Some devices might need time to cool down between between consecutive runs.</li>
</ul>
Expand Down
9 changes: 7 additions & 2 deletions resources/charts/developer.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@
<body>
<div id="app">
<h1>Demo page (not intended for workload)</h1>
<p>This page shows the various workloads to help with local development. The runner should open only one of them.</p>
<p>
This page shows the various workloads to help with local development. The runner should open only one of
them.
</p>
<details open>
<summary><strong>Observable Plot</strong> (<a href="./observable-plot.html">open in full page</a>)</summary>
<summary>
<strong>Observable Plot</strong> (<a href="./observable-plot.html">open in full page</a>)
</summary>
<iframe src="./observable-plot.html"></iframe>
</details>
<details open>
Expand Down
4 changes: 3 additions & 1 deletion resources/charts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ <h1>Charting workloads</h1>
<li><a href="./observable-plot.html">Observable Plot</a></li>
<li><a href="./chartjs.html">Chart.js</a></li>
</ul>
<p>You can also find the <a href="./developer.html">developer page</a> that includes all workloads in iframes.</p>
<p>
You can also find the <a href="./developer.html">developer page</a> that includes all workloads in iframes.
</p>
</body>
</html>
13 changes: 10 additions & 3 deletions resources/charts/observable-plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,15 @@ function addStackedBars() {
x: "state",
y: "total",
fill: "index",
title: (d) => `${d.iata === "Other" ? "Other" : `${d.name}, ${d.city} (${d.iata})`}\n${d3Format(",")(d.total)} flights`,
title: (d) =>
`${d.iata === "Other" ? "Other" : `${d.name}, ${d.city} (${d.iata})`}\n${d3Format(",")(d.total)} flights`,
}),
Plot.text(preparedData.stateInformationSortedArray, {
x: "state",
y: "total",
text: (d) => d3Format(".2~s")(d.total),
dy: -10,
}),
Plot.text(preparedData.stateInformationSortedArray, { x: "state", y: "total", text: (d) => d3Format(".2~s")(d.total), dy: -10 }),
Plot.ruleY([0]),
],
};
Expand Down Expand Up @@ -183,7 +189,8 @@ function addDottedBars() {
r: 4,
stroke: "value",
strokeWidth: 3,
title: (d) => `${d.iata === "Other" ? "Other" : `${d.name}, ${d.city} (${d.iata})`}\n${d3Format(",")(Math.abs(d.value))} ${d.value > 0 ? "inward" : "outward"} flights`,
title: (d) =>
`${d.iata === "Other" ? "Other" : `${d.name}, ${d.city} (${d.iata})`}\n${d3Format(",")(Math.abs(d.value))} ${d.value > 0 ? "inward" : "outward"} flights`,
}),
Plot.ruleY([0]),
],
Expand Down
80 changes: 71 additions & 9 deletions resources/editors/codemirror.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,22 @@
<div id="app">
<div id="controls">
<button id="create">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-square-plus" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-square-plus"
width="24"
height="24"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"></path>
<path
d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"
></path>
<path d="M9 12l6 0"></path>
<path d="M12 9l0 6"></path>
</svg>
Expand All @@ -43,8 +56,16 @@
stroke-width="0"
fill="currentColor"
></path>
<path d="M15 20a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z" stroke-width="0" fill="currentColor"></path>
<path d="M15 17a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z" stroke-width="0" fill="currentColor"></path>
<path
d="M15 20a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z"
stroke-width="0"
fill="currentColor"
></path>
<path
d="M15 17a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z"
stroke-width="0"
fill="currentColor"
></path>
</svg>
Long text
</button>
Expand All @@ -67,14 +88,33 @@
stroke-width="0"
fill="currentColor"
></path>
<path d="M15 2a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z" stroke-width="0" fill="currentColor"></path>
<path d="M15 5a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z" stroke-width="0" fill="currentColor"></path>
<path
d="M15 2a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z"
stroke-width="0"
fill="currentColor"
></path>
<path
d="M15 5a1 1 0 0 1 .117 1.993l-.117 .007h-6a1 1 0 0 1 -.117 -1.993l.117 -.007h6z"
stroke-width="0"
fill="currentColor"
></path>
</svg>
Short text
</button>
&nbsp;
<button id="highlight">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-highlight" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-highlight"
width="24"
height="24"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"></path>
<path d="M12.5 5.5l4 4"></path>
Expand Down Expand Up @@ -107,7 +147,18 @@
</button>
&nbsp;
<button id="scroll">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-line-height" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-line-height"
width="24"
height="24"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 8l3 -3l3 3"></path>
<path d="M3 16l3 3l3 -3"></path>
Expand All @@ -120,7 +171,18 @@
</button>
&nbsp;
<button id="layout">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh-dot" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-refresh-dot"
width="24"
height="24"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"></path>
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"></path>
Expand Down
5 changes: 4 additions & 1 deletion resources/editors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
<body>
<div id="app">
<h1>Demo page (not intended for workload)</h1>
<p>This page shows the various workloads to help with local development. The runner should open only one of them.</p>
<p>
This page shows the various workloads to help with local development. The runner should open only one of
them.
</p>
<details open>
<summary><strong>Code Editors</strong></summary>
<iframe src="./codemirror.html"></iframe>
Expand Down
Loading

0 comments on commit ec73337

Please sign in to comment.