@ogygia/devtools 0.0.0-stage → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -2
- package/dist/client.d.ts +3 -0
- package/dist/client.js +24 -0
- package/dist/devtools/BoundaryOverlay.svelte +396 -0
- package/dist/devtools/BoundaryOverlay.svelte.d.ts +19 -0
- package/dist/devtools/Devtools.svelte +663 -0
- package/dist/devtools/Devtools.svelte.d.ts +15 -0
- package/dist/devtools/HubTab.svelte +206 -0
- package/dist/devtools/HubTab.svelte.d.ts +11 -0
- package/dist/devtools/HydrationTab.svelte +237 -0
- package/dist/devtools/HydrationTab.svelte.d.ts +13 -0
- package/dist/devtools/IslandDetail.svelte +615 -0
- package/dist/devtools/IslandDetail.svelte.d.ts +15 -0
- package/dist/devtools/LedgerTab.svelte +287 -0
- package/dist/devtools/LedgerTab.svelte.d.ts +11 -0
- package/dist/devtools/LensTab.svelte +290 -0
- package/dist/devtools/LensTab.svelte.d.ts +19 -0
- package/dist/devtools/NavTab.svelte +229 -0
- package/dist/devtools/NavTab.svelte.d.ts +11 -0
- package/dist/devtools/PageTab.svelte +1122 -0
- package/dist/devtools/PageTab.svelte.d.ts +15 -0
- package/dist/devtools/ProfilerTab.svelte +755 -0
- package/dist/devtools/ProfilerTab.svelte.d.ts +15 -0
- package/dist/devtools/PropsTree.svelte +155 -0
- package/dist/devtools/PropsTree.svelte.d.ts +15 -0
- package/dist/devtools/SessionTab.svelte +796 -0
- package/dist/devtools/SessionTab.svelte.d.ts +11 -0
- package/dist/devtools/TimelineTab.svelte +267 -0
- package/dist/devtools/TimelineTab.svelte.d.ts +11 -0
- package/dist/devtools/WireTab.svelte +149 -0
- package/dist/devtools/WireTab.svelte.d.ts +11 -0
- package/dist/devtools/bytes.d.ts +70 -0
- package/dist/devtools/bytes.js +82 -0
- package/dist/devtools/cache-headers.d.ts +20 -0
- package/dist/devtools/cache-headers.js +81 -0
- package/dist/devtools/highlight.d.ts +7 -0
- package/dist/devtools/highlight.js +83 -0
- package/dist/devtools/hydration.d.ts +48 -0
- package/dist/devtools/hydration.js +93 -0
- package/dist/devtools/index.d.ts +3 -0
- package/dist/devtools/index.js +3 -0
- package/dist/devtools/ledger-dom.d.ts +7 -0
- package/dist/devtools/ledger-dom.js +151 -0
- package/dist/devtools/leftovers.d.ts +77 -0
- package/dist/devtools/leftovers.js +319 -0
- package/dist/devtools/names.d.ts +1 -0
- package/dist/devtools/names.js +34 -0
- package/dist/devtools/page.d.ts +96 -0
- package/dist/devtools/page.js +957 -0
- package/dist/devtools/profile-anchors.d.ts +22 -0
- package/dist/devtools/profile-anchors.js +135 -0
- package/dist/devtools/profile-store.d.ts +175 -0
- package/dist/devtools/profile-store.js +239 -0
- package/dist/devtools/regions.d.ts +77 -0
- package/dist/devtools/regions.js +132 -0
- package/dist/devtools/session.d.ts +31 -0
- package/dist/devtools/session.js +455 -0
- package/dist/devtools/since-load.d.ts +50 -0
- package/dist/devtools/since-load.js +89 -0
- package/dist/devtools/source-lines.d.ts +24 -0
- package/dist/devtools/source-lines.js +106 -0
- package/dist/devtools/styles.d.ts +52 -0
- package/dist/devtools/styles.js +248 -0
- package/dist/devtools/testing-engine.d.ts +83 -0
- package/dist/devtools/testing-engine.js +220 -0
- package/dist/devtools/ui-app.d.ts +5 -0
- package/dist/devtools/ui-app.js +69 -0
- package/dist/devtools/ui.d.ts +50 -0
- package/dist/devtools/ui.js +175 -0
- package/dist/profiler/alloc.d.ts +75 -0
- package/dist/profiler/alloc.js +76 -0
- package/dist/profiler/analyze.d.ts +437 -0
- package/dist/profiler/analyze.js +1941 -0
- package/dist/profiler/app-path.d.ts +7 -0
- package/dist/profiler/app-path.js +26 -0
- package/dist/profiler/async-io.d.ts +58 -0
- package/dist/profiler/async-io.js +187 -0
- package/dist/profiler/beacon-standalone.d.ts +4 -0
- package/dist/profiler/beacon-standalone.js +409 -0
- package/dist/profiler/browser-findings.d.ts +25 -0
- package/dist/profiler/browser-findings.js +260 -0
- package/dist/profiler/byte-strip.d.ts +58 -0
- package/dist/profiler/byte-strip.js +228 -0
- package/dist/profiler/client-files.d.ts +16 -0
- package/dist/profiler/client-files.js +60 -0
- package/dist/profiler/client-windows.d.ts +49 -0
- package/dist/profiler/client-windows.js +95 -0
- package/dist/profiler/client.d.ts +40 -0
- package/dist/profiler/client.js +82 -0
- package/dist/profiler/compare.d.ts +308 -0
- package/dist/profiler/compare.js +733 -0
- package/dist/profiler/compress.d.ts +10 -0
- package/dist/profiler/compress.js +36 -0
- package/dist/profiler/contention.d.ts +60 -0
- package/dist/profiler/contention.js +86 -0
- package/dist/profiler/crypto.d.ts +19 -0
- package/dist/profiler/crypto.js +101 -0
- package/dist/profiler/doc-diff.d.ts +47 -0
- package/dist/profiler/doc-diff.js +214 -0
- package/dist/profiler/dom-diff.d.ts +43 -0
- package/dist/profiler/dom-diff.js +121 -0
- package/dist/profiler/drill.d.ts +89 -0
- package/dist/profiler/drill.js +553 -0
- package/dist/profiler/embedded-maps.d.ts +37 -0
- package/dist/profiler/embedded-maps.js +135 -0
- package/dist/profiler/env.d.ts +6 -0
- package/dist/profiler/env.js +10 -0
- package/dist/profiler/forecast.d.ts +76 -0
- package/dist/profiler/forecast.js +225 -0
- package/dist/profiler/frames.d.ts +11 -0
- package/dist/profiler/frames.js +42 -0
- package/dist/profiler/gc.d.ts +144 -0
- package/dist/profiler/gc.js +271 -0
- package/dist/profiler/hole-slots.d.ts +31 -0
- package/dist/profiler/hole-slots.js +90 -0
- package/dist/profiler/index.d.ts +288 -0
- package/dist/profiler/index.js +4921 -0
- package/dist/profiler/insights.d.ts +96 -0
- package/dist/profiler/insights.js +239 -0
- package/dist/profiler/ledger.d.ts +121 -0
- package/dist/profiler/ledger.js +440 -0
- package/dist/profiler/lineage.d.ts +81 -0
- package/dist/profiler/lineage.js +359 -0
- package/dist/profiler/module-map.d.ts +12 -0
- package/dist/profiler/module-map.js +94 -0
- package/dist/profiler/net.d.ts +169 -0
- package/dist/profiler/net.js +586 -0
- package/dist/profiler/on-demand.d.ts +11 -0
- package/dist/profiler/on-demand.js +15 -0
- package/dist/profiler/own-requests.d.ts +9 -0
- package/dist/profiler/own-requests.js +17 -0
- package/dist/profiler/patterns.d.ts +476 -0
- package/dist/profiler/patterns.js +2203 -0
- package/dist/profiler/profiler-router.d.ts +245 -0
- package/dist/profiler/profiler-router.js +113 -0
- package/dist/profiler/refresh-stub.d.ts +2 -0
- package/dist/profiler/refresh-stub.js +37 -0
- package/dist/profiler/report.d.ts +1404 -0
- package/dist/profiler/report.js +2638 -0
- package/dist/profiler/river.d.ts +65 -0
- package/dist/profiler/river.js +298 -0
- package/dist/profiler/route-files.d.ts +22 -0
- package/dist/profiler/route-files.js +55 -0
- package/dist/profiler/route-imports.d.ts +14 -0
- package/dist/profiler/route-imports.js +83 -0
- package/dist/profiler/saving.d.ts +22 -0
- package/dist/profiler/saving.js +42 -0
- package/dist/profiler/score.d.ts +109 -0
- package/dist/profiler/score.js +261 -0
- package/dist/profiler/session-cookie.d.ts +28 -0
- package/dist/profiler/session-cookie.js +45 -0
- package/dist/profiler/sink.d.ts +81 -0
- package/dist/profiler/sink.js +124 -0
- package/dist/profiler/site-fixes.d.ts +25 -0
- package/dist/profiler/site-fixes.js +62 -0
- package/dist/profiler/source-scan.d.ts +210 -0
- package/dist/profiler/source-scan.js +1724 -0
- package/dist/profiler/span.d.ts +90 -0
- package/dist/profiler/span.js +109 -0
- package/dist/profiler/stacks.d.ts +43 -0
- package/dist/profiler/stacks.js +107 -0
- package/dist/profiler/standalone.d.ts +27 -0
- package/dist/profiler/standalone.js +98 -0
- package/dist/profiler/steps.d.ts +39 -0
- package/dist/profiler/steps.js +74 -0
- package/dist/profiler/storage/index.d.ts +87 -0
- package/dist/profiler/storage/index.js +76 -0
- package/dist/profiler/storage/postgres.d.ts +12 -0
- package/dist/profiler/storage/postgres.js +94 -0
- package/dist/profiler/storage/redis.d.ts +19 -0
- package/dist/profiler/storage/redis.js +148 -0
- package/dist/profiler/storage/sqlite.d.ts +2 -0
- package/dist/profiler/storage/sqlite.js +85 -0
- package/dist/profiler/storage/visits.d.ts +4 -0
- package/dist/profiler/storage/visits.js +6 -0
- package/dist/profiler/stream-tail.d.ts +26 -0
- package/dist/profiler/stream-tail.js +74 -0
- package/dist/profiler/timeline.d.ts +279 -0
- package/dist/profiler/timeline.js +690 -0
- package/dist/profiler/ui/AllocStrip.svelte +146 -0
- package/dist/profiler/ui/AllocStrip.svelte.d.ts +17 -0
- package/dist/profiler/ui/Awaits.svelte +363 -0
- package/dist/profiler/ui/Awaits.svelte.d.ts +16 -0
- package/dist/profiler/ui/ByteStrip.svelte +182 -0
- package/dist/profiler/ui/ByteStrip.svelte.d.ts +18 -0
- package/dist/profiler/ui/Compare.svelte +24 -0
- package/dist/profiler/ui/Compare.svelte.d.ts +16 -0
- package/dist/profiler/ui/CompareBody.svelte +429 -0
- package/dist/profiler/ui/CompareBody.svelte.d.ts +8 -0
- package/dist/profiler/ui/ComponentsTable.svelte +265 -0
- package/dist/profiler/ui/ComponentsTable.svelte.d.ts +20 -0
- package/dist/profiler/ui/Dashboard.svelte +492 -0
- package/dist/profiler/ui/Dashboard.svelte.d.ts +31 -0
- package/dist/profiler/ui/DataRiver.svelte +206 -0
- package/dist/profiler/ui/DataRiver.svelte.d.ts +13 -0
- package/dist/profiler/ui/DomTravel.svelte +207 -0
- package/dist/profiler/ui/DomTravel.svelte.d.ts +9 -0
- package/dist/profiler/ui/DownloadHtml.svelte +52 -0
- package/dist/profiler/ui/DownloadHtml.svelte.d.ts +10 -0
- package/dist/profiler/ui/Drill.svelte +276 -0
- package/dist/profiler/ui/Drill.svelte.d.ts +12 -0
- package/dist/profiler/ui/ExportButton.svelte +59 -0
- package/dist/profiler/ui/ExportButton.svelte.d.ts +8 -0
- package/dist/profiler/ui/Flame.svelte +222 -0
- package/dist/profiler/ui/Flame.svelte.d.ts +12 -0
- package/dist/profiler/ui/FrameDetails.svelte +308 -0
- package/dist/profiler/ui/FrameDetails.svelte.d.ts +16 -0
- package/dist/profiler/ui/FunctionsTable.svelte +156 -0
- package/dist/profiler/ui/FunctionsTable.svelte.d.ts +17 -0
- package/dist/profiler/ui/IslandHeatmap.svelte +151 -0
- package/dist/profiler/ui/IslandHeatmap.svelte.d.ts +16 -0
- package/dist/profiler/ui/IslandsTable.svelte +448 -0
- package/dist/profiler/ui/IslandsTable.svelte.d.ts +16 -0
- package/dist/profiler/ui/KeepLocal.svelte +46 -0
- package/dist/profiler/ui/KeepLocal.svelte.d.ts +8 -0
- package/dist/profiler/ui/Ledger.svelte +196 -0
- package/dist/profiler/ui/Ledger.svelte.d.ts +18 -0
- package/dist/profiler/ui/LocalCompare.svelte +48 -0
- package/dist/profiler/ui/LocalCompare.svelte.d.ts +8 -0
- package/dist/profiler/ui/LocalReports.svelte +68 -0
- package/dist/profiler/ui/LocalReports.svelte.d.ts +7 -0
- package/dist/profiler/ui/Login.svelte +13 -0
- package/dist/profiler/ui/Login.svelte.d.ts +12 -0
- package/dist/profiler/ui/LoginForm.svelte +42 -0
- package/dist/profiler/ui/LoginForm.svelte.d.ts +7 -0
- package/dist/profiler/ui/Message.svelte +10 -0
- package/dist/profiler/ui/Message.svelte.d.ts +12 -0
- package/dist/profiler/ui/OnThisPage.svelte +137 -0
- package/dist/profiler/ui/OnThisPage.svelte.d.ts +3 -0
- package/dist/profiler/ui/OneClock.svelte +297 -0
- package/dist/profiler/ui/OneClock.svelte.d.ts +27 -0
- package/dist/profiler/ui/Panel.svelte +10 -0
- package/dist/profiler/ui/Panel.svelte.d.ts +16 -0
- package/dist/profiler/ui/Paths.svelte +269 -0
- package/dist/profiler/ui/Paths.svelte.d.ts +15 -0
- package/dist/profiler/ui/Patterns.svelte +364 -0
- package/dist/profiler/ui/Patterns.svelte.d.ts +15 -0
- package/dist/profiler/ui/PermalinkGate.svelte +143 -0
- package/dist/profiler/ui/PermalinkGate.svelte.d.ts +10 -0
- package/dist/profiler/ui/RenderSteps.svelte +218 -0
- package/dist/profiler/ui/RenderSteps.svelte.d.ts +13 -0
- package/dist/profiler/ui/Report.svelte +28 -0
- package/dist/profiler/ui/Report.svelte.d.ts +20 -0
- package/dist/profiler/ui/ReportBody.svelte +2592 -0
- package/dist/profiler/ui/ReportBody.svelte.d.ts +21 -0
- package/dist/profiler/ui/Run.svelte +17 -0
- package/dist/profiler/ui/Run.svelte.d.ts +14 -0
- package/dist/profiler/ui/RunView.svelte +146 -0
- package/dist/profiler/ui/RunView.svelte.d.ts +10 -0
- package/dist/profiler/ui/ScoreCard.svelte +197 -0
- package/dist/profiler/ui/ScoreCard.svelte.d.ts +7 -0
- package/dist/profiler/ui/Scrub.svelte +293 -0
- package/dist/profiler/ui/Scrub.svelte.d.ts +18 -0
- package/dist/profiler/ui/SeedExplainer.svelte +193 -0
- package/dist/profiler/ui/SeedExplainer.svelte.d.ts +16 -0
- package/dist/profiler/ui/ShareLink.svelte +148 -0
- package/dist/profiler/ui/ShareLink.svelte.d.ts +8 -0
- package/dist/profiler/ui/Shell.svelte +50 -0
- package/dist/profiler/ui/Shell.svelte.d.ts +27 -0
- package/dist/profiler/ui/Sidebar.svelte +312 -0
- package/dist/profiler/ui/Sidebar.svelte.d.ts +7 -0
- package/dist/profiler/ui/Site.svelte +20 -0
- package/dist/profiler/ui/Site.svelte.d.ts +23 -0
- package/dist/profiler/ui/SiteView.svelte +385 -0
- package/dist/profiler/ui/SiteView.svelte.d.ts +27 -0
- package/dist/profiler/ui/ThemeSwitch.svelte +78 -0
- package/dist/profiler/ui/ThemeSwitch.svelte.d.ts +3 -0
- package/dist/profiler/ui/Timeline.svelte +672 -0
- package/dist/profiler/ui/Timeline.svelte.d.ts +22 -0
- package/dist/profiler/ui/Treemap.svelte +278 -0
- package/dist/profiler/ui/Treemap.svelte.d.ts +20 -0
- package/dist/profiler/ui/Upload.svelte +19 -0
- package/dist/profiler/ui/Upload.svelte.d.ts +10 -0
- package/dist/profiler/ui/UploadForm.svelte +59 -0
- package/dist/profiler/ui/UploadForm.svelte.d.ts +6 -0
- package/dist/profiler/ui/WaitingTable.svelte +55 -0
- package/dist/profiler/ui/WaitingTable.svelte.d.ts +14 -0
- package/dist/profiler/ui/Waterfall.svelte +371 -0
- package/dist/profiler/ui/Waterfall.svelte.d.ts +7 -0
- package/dist/profiler/ui/WhatIf.svelte +87 -0
- package/dist/profiler/ui/WhatIf.svelte.d.ts +18 -0
- package/dist/profiler/ui/fake-progress.svelte.d.ts +15 -0
- package/dist/profiler/ui/fake-progress.svelte.js +38 -0
- package/dist/profiler/ui/format.d.ts +20 -0
- package/dist/profiler/ui/format.js +71 -0
- package/dist/profiler/ui/permalink.d.ts +9 -0
- package/dist/profiler/ui/permalink.js +108 -0
- package/dist/profiler/ui/press.d.ts +5 -0
- package/dist/profiler/ui/press.js +19 -0
- package/dist/profiler/ui/profiler.css +650 -0
- package/dist/profiler/ui/report-data.d.ts +189 -0
- package/dist/profiler/ui/report-data.js +393 -0
- package/dist/profiler/ui/report-request.d.ts +6 -0
- package/dist/profiler/ui/report-request.js +50 -0
- package/dist/profiler/ui/row-anchor.svelte.d.ts +12 -0
- package/dist/profiler/ui/row-anchor.svelte.js +44 -0
- package/dist/profiler/ui/sort.svelte.d.ts +14 -0
- package/dist/profiler/ui/sort.svelte.js +37 -0
- package/dist/profiler/ui/store.d.ts +45 -0
- package/dist/profiler/ui/store.js +92 -0
- package/dist/profiler/visit.d.ts +389 -0
- package/dist/profiler/visit.js +1002 -0
- package/dist/report.d.ts +5 -0
- package/dist/report.js +4 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +38 -0
- package/dist/vite.d.ts +12 -0
- package/dist/vite.js +78 -0
- package/package.json +103 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<script>import { fmt_ms, CATEGORY_COLOR } from "./format.js";
|
|
2
|
+
let { steps } = $props();
|
|
3
|
+
let i = $state(0);
|
|
4
|
+
const n = $derived(steps.steps.length);
|
|
5
|
+
const cur = $derived(steps.steps[Math.min(i, n - 1)]);
|
|
6
|
+
const pct = (ms) => steps.window_ms > 0 ? ms / steps.window_ms * 100 : 0;
|
|
7
|
+
const color = (s) => s.kind === "wait" ? "#2a3830" : CATEGORY_COLOR[s.category] ?? "#6b7280";
|
|
8
|
+
const go = (d) => i = Math.max(0, Math.min(n - 1, i + d));
|
|
9
|
+
function keys(e) {
|
|
10
|
+
if (e.key === "ArrowRight") {
|
|
11
|
+
go(1);
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
} else if (e.key === "ArrowLeft") {
|
|
14
|
+
go(-1);
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
} else if (e.key === "End") {
|
|
17
|
+
i = n - 1;
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
} else if (e.key === "Home") {
|
|
20
|
+
i = 0;
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// the biggest few steps, as jump targets
|
|
25
|
+
const big = $derived([...steps.steps].sort((a, b) => b.ms - a.ms).slice(0, 5));
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
|
|
29
|
+
<div
|
|
30
|
+
class="stepper"
|
|
31
|
+
tabindex="0"
|
|
32
|
+
onkeydown={keys}
|
|
33
|
+
role="group"
|
|
34
|
+
aria-label="the render step by step"
|
|
35
|
+
>
|
|
36
|
+
<div class="track" role="group" aria-label="the render's steps in order">
|
|
37
|
+
{#each steps.steps as s (s.i)}
|
|
38
|
+
<button
|
|
39
|
+
class="seg"
|
|
40
|
+
class:wait={s.kind === 'wait'}
|
|
41
|
+
class:on={s.i === cur.i}
|
|
42
|
+
style="left:{pct(s.t0)}%;width:{Math.max(pct(s.ms), 0.2)}%;background:{color(s)}"
|
|
43
|
+
title="{s.label} · {fmt_ms(s.ms)} ms"
|
|
44
|
+
onclick={() => (i = s.i)}
|
|
45
|
+
aria-label="step {s.i + 1}: {s.label}"
|
|
46
|
+
></button>
|
|
47
|
+
{/each}
|
|
48
|
+
</div>
|
|
49
|
+
<div class="ctl">
|
|
50
|
+
<button onclick={() => go(-1)} disabled={i === 0} aria-label="previous step">←</button>
|
|
51
|
+
<!-- no `bind:` here: the router-CSS leg compiles this template without its script, and a
|
|
52
|
+
binding to an undeclared name throws there, which ships the whole style block UNSCOPED -->
|
|
53
|
+
<input
|
|
54
|
+
type="range"
|
|
55
|
+
min="0"
|
|
56
|
+
max={n - 1}
|
|
57
|
+
value={i}
|
|
58
|
+
oninput={(e) => (i = Number(e.currentTarget.value))}
|
|
59
|
+
aria-label="step"
|
|
60
|
+
/>
|
|
61
|
+
<button onclick={() => go(1)} disabled={i >= n - 1} aria-label="next step">→</button>
|
|
62
|
+
<span class="hint"
|
|
63
|
+
>step {cur.i + 1} of {n} · {fmt_ms(cur.at_ms)} ms into the render · {fmt_ms(
|
|
64
|
+
cur.cpu_so_far_ms
|
|
65
|
+
)} ms CPU so far</span
|
|
66
|
+
>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="card">
|
|
69
|
+
<div class="head">
|
|
70
|
+
<i class="dot" style="background:{color(cur)}"></i>
|
|
71
|
+
{#if cur.kind === 'wait'}
|
|
72
|
+
<b>waited</b> {fmt_ms(cur.ms)} ms for <b>{cur.label}</b>
|
|
73
|
+
{:else}
|
|
74
|
+
<b>{cur.label}</b> ran for <b>{fmt_ms(cur.ms)} ms</b>
|
|
75
|
+
{/if}
|
|
76
|
+
<span class="hint"
|
|
77
|
+
>{fmt_ms(cur.t0)} → {fmt_ms(cur.t1)} ms{#if cur.folded}
|
|
78
|
+
· {cur.folded} smaller step{cur.folded === 1 ? '' : 's'} folded in{/if}</span
|
|
79
|
+
>
|
|
80
|
+
</div>
|
|
81
|
+
{#if cur.file}<div class="hint file">{cur.file}</div>{/if}
|
|
82
|
+
{#if cur.detail && cur.detail !== cur.label}<div class="hint">
|
|
83
|
+
burning inside it: <b>{cur.detail}</b>
|
|
84
|
+
</div>{/if}
|
|
85
|
+
{#if cur.within}<div class="hint">inside span <b>{cur.within}</b></div>{/if}
|
|
86
|
+
{#if cur.calls?.length}
|
|
87
|
+
<ul class="calls">
|
|
88
|
+
{#each cur.calls.slice(0, 8) as c, k (k)}
|
|
89
|
+
<li>{c.label} <span class="hint">{fmt_ms(c.ms)} ms</span></li>
|
|
90
|
+
{/each}
|
|
91
|
+
{#if cur.calls.length > 8}<li class="hint">+{cur.calls.length - 8} more in flight</li>{/if}
|
|
92
|
+
</ul>
|
|
93
|
+
{/if}
|
|
94
|
+
{#if cur.stack?.length}
|
|
95
|
+
<div class="hint" style="margin-top:6px">the stack at its middle, outermost first:</div>
|
|
96
|
+
<ol class="stack">
|
|
97
|
+
{#each cur.stack as f, k (k)}<li>{f}</li>{/each}
|
|
98
|
+
</ol>
|
|
99
|
+
{/if}
|
|
100
|
+
</div>
|
|
101
|
+
<p class="hint jumps">
|
|
102
|
+
longest steps:
|
|
103
|
+
{#each big as s (s.i)}
|
|
104
|
+
<button class="lnk" onclick={() => (i = s.i)}
|
|
105
|
+
>{s.kind === 'wait' ? 'wait for ' : ''}{s.label} <b>{fmt_ms(s.ms)}</b></button
|
|
106
|
+
>
|
|
107
|
+
{/each}
|
|
108
|
+
· {fmt_ms(steps.cpu_ms)} ms on the CPU, {fmt_ms(steps.wait_ms)} ms waiting · ← → keys step
|
|
109
|
+
</p>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<style>
|
|
113
|
+
.stepper {
|
|
114
|
+
outline: none;
|
|
115
|
+
margin: 6px 0 10px;
|
|
116
|
+
}
|
|
117
|
+
.stepper:focus-visible {
|
|
118
|
+
box-shadow: 0 0 0 2px var(--accent-line);
|
|
119
|
+
border-radius: var(--r-sm);
|
|
120
|
+
}
|
|
121
|
+
.track {
|
|
122
|
+
position: relative;
|
|
123
|
+
height: 22px;
|
|
124
|
+
background: var(--bg-sunken);
|
|
125
|
+
border: 1px solid var(--line);
|
|
126
|
+
border-radius: var(--r-sm);
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
}
|
|
129
|
+
.seg {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
height: 100%;
|
|
133
|
+
border: 0;
|
|
134
|
+
padding: 0;
|
|
135
|
+
margin: 0;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.4);
|
|
138
|
+
opacity: 0.85;
|
|
139
|
+
}
|
|
140
|
+
.seg.wait {
|
|
141
|
+
background-image: repeating-linear-gradient(
|
|
142
|
+
45deg,
|
|
143
|
+
transparent 0 3px,
|
|
144
|
+
rgba(255, 255, 255, 0.08) 3px 6px
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
.seg.on {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
box-shadow: inset 0 0 0 2px var(--accent-strong);
|
|
150
|
+
z-index: 1;
|
|
151
|
+
}
|
|
152
|
+
.ctl {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: 8px;
|
|
156
|
+
margin: 8px 0;
|
|
157
|
+
font-size: 12px;
|
|
158
|
+
flex-wrap: wrap;
|
|
159
|
+
}
|
|
160
|
+
.ctl input[type='range'] {
|
|
161
|
+
flex: 1 1 200px;
|
|
162
|
+
min-width: 120px;
|
|
163
|
+
}
|
|
164
|
+
.ctl button {
|
|
165
|
+
padding: 2px 10px;
|
|
166
|
+
}
|
|
167
|
+
.card {
|
|
168
|
+
border: 1px solid var(--line);
|
|
169
|
+
border-radius: var(--r-md);
|
|
170
|
+
padding: 10px 12px;
|
|
171
|
+
background: var(--bg-raised);
|
|
172
|
+
font-size: 13px;
|
|
173
|
+
}
|
|
174
|
+
.head {
|
|
175
|
+
display: flex;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
align-items: baseline;
|
|
178
|
+
flex-wrap: wrap;
|
|
179
|
+
}
|
|
180
|
+
.dot {
|
|
181
|
+
display: inline-block;
|
|
182
|
+
width: 10px;
|
|
183
|
+
height: 10px;
|
|
184
|
+
border-radius: 2px;
|
|
185
|
+
align-self: center;
|
|
186
|
+
}
|
|
187
|
+
.file {
|
|
188
|
+
font-family: var(--font-mono);
|
|
189
|
+
color: var(--text-faint);
|
|
190
|
+
}
|
|
191
|
+
.calls {
|
|
192
|
+
margin: 6px 0 0;
|
|
193
|
+
padding-left: 18px;
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
}
|
|
196
|
+
.stack {
|
|
197
|
+
margin: 2px 0 0;
|
|
198
|
+
padding-left: 22px;
|
|
199
|
+
font-size: 12px;
|
|
200
|
+
line-height: 1.45;
|
|
201
|
+
font-family: var(--font-mono);
|
|
202
|
+
}
|
|
203
|
+
.jumps .lnk {
|
|
204
|
+
background: none;
|
|
205
|
+
border: 1px solid var(--line-strong);
|
|
206
|
+
color: inherit;
|
|
207
|
+
font: inherit;
|
|
208
|
+
font-size: 12px;
|
|
209
|
+
padding: 0 6px;
|
|
210
|
+
border-radius: var(--r-sm);
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
margin: 0 2px;
|
|
213
|
+
}
|
|
214
|
+
.jumps .lnk:hover {
|
|
215
|
+
border-color: var(--accent-line);
|
|
216
|
+
color: var(--accent-strong);
|
|
217
|
+
}
|
|
218
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE RENDER, STEPPED — one step at a time through the window (steps.ts): this component
|
|
3
|
+
* rendered for this long, then the server waited for that, then… with how far into the
|
|
4
|
+
* render we are, the CPU so far, and the stack at the step's middle. A slider and two keys
|
|
5
|
+
* (← →) instead of a chart, for the reader who wants to walk it. A `wake:'load'` island.
|
|
6
|
+
*/
|
|
7
|
+
import type { RenderSteps } from '../steps.js';
|
|
8
|
+
type $$ComponentProps = {
|
|
9
|
+
steps: RenderSteps;
|
|
10
|
+
};
|
|
11
|
+
declare const RenderSteps: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type RenderSteps = ReturnType<typeof RenderSteps>;
|
|
13
|
+
export default RenderSteps;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script>/**
|
|
2
|
+
* The report PAGE — a thin router over the one renderer (`ReportBody`). `/report/[id]` is public;
|
|
3
|
+
* its load returns the server report ONLY when logged in. So:
|
|
4
|
+
* - `data.report` present → render it (your own captured report).
|
|
5
|
+
* - absent → this is a **share link**: `PermalinkGate` (a client island) reads the URL `#fragment`,
|
|
6
|
+
* asks for the password, decrypts it in the browser, and renders the SAME `ReportBody`.
|
|
7
|
+
* One view, one renderer, two data sources — nothing on the server ever sees a shared report.
|
|
8
|
+
*/
|
|
9
|
+
import ReportBody from "./ReportBody.svelte";
|
|
10
|
+
import PermalinkGate from "./PermalinkGate.svelte" with { wake: "load" };
|
|
11
|
+
let { data } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#if data.report}
|
|
15
|
+
<ReportBody
|
|
16
|
+
a={data.report.a}
|
|
17
|
+
meta={data.report.meta}
|
|
18
|
+
base={data.report.base}
|
|
19
|
+
extras={data.report.extras}
|
|
20
|
+
ogpB64={data.report.ogpB64}
|
|
21
|
+
history={data.report.history}
|
|
22
|
+
prev={data.report.prev}
|
|
23
|
+
since={data.report.since}
|
|
24
|
+
dev={data.report.dev}
|
|
25
|
+
/>
|
|
26
|
+
{:else}
|
|
27
|
+
<PermalinkGate base={data.base} login={data.login} exists={data.exists} />
|
|
28
|
+
{/if}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const Report: import("svelte").Component<{
|
|
2
|
+
data: {
|
|
3
|
+
report: Awaited<ReturnType<import("../profiler-router.js").ProfilerDeps["report_view"]>>;
|
|
4
|
+
base: string;
|
|
5
|
+
login: null;
|
|
6
|
+
exists: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
report: null;
|
|
9
|
+
base: string;
|
|
10
|
+
login: string | null;
|
|
11
|
+
exists: boolean;
|
|
12
|
+
};
|
|
13
|
+
form: null;
|
|
14
|
+
params: {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
search: {};
|
|
18
|
+
}, {}, "">;
|
|
19
|
+
type Report = ReturnType<typeof Report>;
|
|
20
|
+
export default Report;
|