@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,1404 @@
|
|
|
1
|
+
import { Analysis, Callee, FrameCategory, FrameStat, HeapAllocator, PathNode } from "./analyze.js";
|
|
2
|
+
import { DocDiff } from "./doc-diff.js";
|
|
3
|
+
import { Forecast } from "./forecast.js";
|
|
4
|
+
import { AwaitEdge, LoadChain, Phase, TimelineCall } from "./timeline.js";
|
|
5
|
+
import { NetCall, ServerTiming, UpstreamTrace } from "./net.js";
|
|
6
|
+
import { ClientWindows, InteractionCpu, WindowFn } from "./client-windows.js";
|
|
7
|
+
import { Visit, VisitNav } from "./visit.js";
|
|
8
|
+
import { StreamTail } from "./stream-tail.js";
|
|
9
|
+
import { ByteStrip, StripKind, StripSegment } from "./byte-strip.js";
|
|
10
|
+
import { MemoCandidate, Retained, SpanValueRow } from "./insights.js";
|
|
11
|
+
import { RenderSteps } from "./steps.js";
|
|
12
|
+
import { ContendingRequest, Contention } from "./contention.js";
|
|
13
|
+
import { KeyVerdict, Lineage, LineageComponent } from "./lineage.js";
|
|
14
|
+
import { HeapGrowth, Pattern, PatternKind, PatternSite } from "./patterns.js";
|
|
15
|
+
import { River } from "./river.js";
|
|
16
|
+
import { GcAttribution } from "./gc.js";
|
|
17
|
+
import { PageScore } from "./score.js";
|
|
18
|
+
import { AllocTimeline } from "./alloc.js";
|
|
19
|
+
import { LedgerLine } from "./ledger.js";
|
|
20
|
+
import { DrillNode } from "./drill.js";
|
|
21
|
+
import { own_requests } from "./own-requests.js";
|
|
22
|
+
import { IoOp } from "./async-io.js";
|
|
23
|
+
import { SpanRecord } from "./span.js";
|
|
24
|
+
import { IslandHazard, PageAssets, RuntimeScripts, browser_of, hazard_fix, hazard_words, inline_threshold_tune } from "@ogygia/core/insights";
|
|
25
|
+
import { HoleRequestStats, HoleStat, IslandStat, OgygiaRequestStats } from "@ogygia/core/internal/server";
|
|
26
|
+
/** One span name across a recording: how often, how long, what went wrong, who called it. */
|
|
27
|
+
export interface SpanRow {
|
|
28
|
+
name: string;
|
|
29
|
+
count: number;
|
|
30
|
+
total_ms: number;
|
|
31
|
+
/** the wall time the spans of this name covered, overlaps counted once — `total_ms` far above
|
|
32
|
+
* it means they ran together (a Promise.all), not one after another */
|
|
33
|
+
wall_ms: number;
|
|
34
|
+
/** SELF: the spans' time minus what their child spans covered — `ds.pass` 249 ms with
|
|
35
|
+
* `ds.render.all` 178 and `ds.splice` 69 inside it is 2 ms of its own */
|
|
36
|
+
self_ms: number;
|
|
37
|
+
/** the median span's FAIR SHARE of the wall (`fair_shares`): what one costs when many overlap —
|
|
38
|
+
* `p50_ms` is then its start-to-end, mostly waiting on the others */
|
|
39
|
+
share_p50_ms: number;
|
|
40
|
+
/** the most spans of this name open at one instant */
|
|
41
|
+
peak: number;
|
|
42
|
+
p50_ms: number;
|
|
43
|
+
max_ms: number;
|
|
44
|
+
errors: number;
|
|
45
|
+
open: number;
|
|
46
|
+
/** `cache` attribute tallies, when the spans carried one */
|
|
47
|
+
cache?: {
|
|
48
|
+
hit: number;
|
|
49
|
+
miss: number;
|
|
50
|
+
miss_ms: number;
|
|
51
|
+
};
|
|
52
|
+
/** distinct callers, most frequent first (at most 3) */
|
|
53
|
+
callers: string[];
|
|
54
|
+
/** other attribute keys seen (shown, not interpreted) */
|
|
55
|
+
attr_keys: string[];
|
|
56
|
+
/** THE BREAKDOWN by attribute value: for each string attribute with a handful of distinct
|
|
57
|
+
* values (`tag`, `key`, `table`…), what each value cost — `ds.render` by tag, `db.query` by
|
|
58
|
+
* table. `total_ms` is summed, `wall_ms` counts overlaps once. Values are capped; the rest
|
|
59
|
+
* fold into `(N more)`. */
|
|
60
|
+
by: Record<string, {
|
|
61
|
+
value: string;
|
|
62
|
+
count: number;
|
|
63
|
+
total_ms: number;
|
|
64
|
+
wall_ms: number;
|
|
65
|
+
share_ms: number;
|
|
66
|
+
p50_ms: number;
|
|
67
|
+
max_ms: number;
|
|
68
|
+
}[]>;
|
|
69
|
+
}
|
|
70
|
+
/** FAIR SHARES of overlapping intervals: at every instant the wall is split evenly among the
|
|
71
|
+
* intervals open then, so the shares add up to exactly the union's length. For 242 renders run
|
|
72
|
+
* together, one's start-to-end (97 ms) is mostly waiting on the other 241; its share (0.8 ms) is
|
|
73
|
+
* its part of the 185 ms they cost. Also the peak number open at once. O(n log n): the share of
|
|
74
|
+
* [a, b] is S(b) − S(a), where S is the running integral of 1 / (number open). */
|
|
75
|
+
export declare function fair_shares(ivs: readonly (readonly [number, number])[]): {
|
|
76
|
+
shares: number[];
|
|
77
|
+
peak: number;
|
|
78
|
+
};
|
|
79
|
+
/** Fold the recording's spans per name. */
|
|
80
|
+
export declare function span_rows(spans: readonly SpanRecord[] | undefined): SpanRow[];
|
|
81
|
+
export interface RequestEntry {
|
|
82
|
+
ts: number;
|
|
83
|
+
method: string;
|
|
84
|
+
path: string;
|
|
85
|
+
route: string | null;
|
|
86
|
+
status: number;
|
|
87
|
+
ms: number;
|
|
88
|
+
/** CPU ms this request burned (process-wide delta; accurate when requests don't overlap) */
|
|
89
|
+
cpu_ms: number;
|
|
90
|
+
/** how many other requests were in flight when this one started */
|
|
91
|
+
inflight: number;
|
|
92
|
+
/** total ms this request spent in outbound network calls */
|
|
93
|
+
net_ms: number;
|
|
94
|
+
net_count: number;
|
|
95
|
+
/** true when the profiler itself made this request (page mode) */
|
|
96
|
+
internal?: boolean;
|
|
97
|
+
/** a remote function call (`path` is its own address: Kit's `url` names the page that asked,
|
|
98
|
+
* or `/` when no page did, as for a server render reading a `prerender` function) */
|
|
99
|
+
remote?: true;
|
|
100
|
+
/** what ogygia's handle added to this page (server/request-stats.ts); absent off the page path */
|
|
101
|
+
og?: OgygiaRequestStats;
|
|
102
|
+
/** `tag()` stamps from the app (tenant, locale, variant…) */
|
|
103
|
+
tags?: Record<string, string>;
|
|
104
|
+
/** `span()` counts for this request: how many, and the top-level spans' summed ms */
|
|
105
|
+
span_count?: number;
|
|
106
|
+
span_ms?: number;
|
|
107
|
+
/** a deferred hole's endpoint request: what its render cache did */
|
|
108
|
+
hole?: HoleRequestStats;
|
|
109
|
+
/** performance.now() at the request's start (the trap matches a window's timeline on it) */
|
|
110
|
+
pt?: number;
|
|
111
|
+
/** the request's query string, kept so a caught request can be replayed */
|
|
112
|
+
search?: string;
|
|
113
|
+
/** the headers the trap config asked to keep for a replay */
|
|
114
|
+
replay_headers?: Record<string, string>;
|
|
115
|
+
}
|
|
116
|
+
/** The page's web vitals as the profiler user's browser reported them (p50 over the visits). */
|
|
117
|
+
export interface PageVitals {
|
|
118
|
+
n: number;
|
|
119
|
+
ttfb: number | null;
|
|
120
|
+
fcp: number | null;
|
|
121
|
+
lcp: number | null;
|
|
122
|
+
cls: number | null;
|
|
123
|
+
inp: number | null;
|
|
124
|
+
}
|
|
125
|
+
/** The cold render (the warm-up) profiled on its own: what module load + compile cost per file. */
|
|
126
|
+
export interface ColdStart {
|
|
127
|
+
/** wall ms of the cold render */
|
|
128
|
+
ms: number;
|
|
129
|
+
busy_ms: number;
|
|
130
|
+
/** self ms per file in the cold render, heaviest first */
|
|
131
|
+
files: {
|
|
132
|
+
file: string;
|
|
133
|
+
category: FrameCategory;
|
|
134
|
+
ms: number;
|
|
135
|
+
}[];
|
|
136
|
+
/** the cold render's CPU by owner, grouped as the drill-down's rows are (a package, `node core`,
|
|
137
|
+
* a function, a component): what each row cost cold */
|
|
138
|
+
owners?: {
|
|
139
|
+
label: string;
|
|
140
|
+
ms: number;
|
|
141
|
+
}[];
|
|
142
|
+
/** outbound calls the cold render made: none means its extra waiting is not new connections */
|
|
143
|
+
calls?: number;
|
|
144
|
+
}
|
|
145
|
+
/** What the browser reported for one island fingerprint (the runtime's hydration beacon). */
|
|
146
|
+
export interface ClientIslandStat {
|
|
147
|
+
/** the island's first fingerprint (the samples of every fingerprint of the entry are merged) */
|
|
148
|
+
fp: string;
|
|
149
|
+
entry: string;
|
|
150
|
+
/** the component's name, when the server row carried it */
|
|
151
|
+
name: string;
|
|
152
|
+
/** hydrations seen */
|
|
153
|
+
n: number;
|
|
154
|
+
/** wake → `data-hydrated`, p50 and max */
|
|
155
|
+
p50_ms: number;
|
|
156
|
+
max_ms: number;
|
|
157
|
+
/** the module-load part of it (hydrate core + the island's chunk closure), p50 */
|
|
158
|
+
load_p50_ms: number;
|
|
159
|
+
/** hydrations that discarded the server DOM and re-rendered: the markup the browser found was
|
|
160
|
+
* not the markup the server sent (a post-SSR pass, a script that edited it before wake) */
|
|
161
|
+
recovered: number;
|
|
162
|
+
/** the named first divergence — the WHY of the recovery (e.g. "an injected <style>", "scoped
|
|
163
|
+
* web-component hydration marks", "whitespace stripped"). Absent when unnameable. */
|
|
164
|
+
reason?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface MemSample {
|
|
167
|
+
/** ms offset from window start */
|
|
168
|
+
t: number;
|
|
169
|
+
rss: number;
|
|
170
|
+
heap_used: number;
|
|
171
|
+
}
|
|
172
|
+
export interface ReportMeta {
|
|
173
|
+
id: string;
|
|
174
|
+
created: number;
|
|
175
|
+
/** `trap`: a slow request the background trap caught (its `request` is the one) */
|
|
176
|
+
trigger: "window" | "page" | "request" | "trap";
|
|
177
|
+
/** trap mode: the threshold the request crossed */
|
|
178
|
+
trap_over?: number;
|
|
179
|
+
/** page mode: the cold (warm-up) render profiled on its own */
|
|
180
|
+
cold?: ColdStart;
|
|
181
|
+
/** page mode: renders served the answers that were the same in every timed render, from memory
|
|
182
|
+
* (`calls` of them): what keeping those answers takes off, measured */
|
|
183
|
+
answers?: {
|
|
184
|
+
runs_ms: number[];
|
|
185
|
+
calls: number;
|
|
186
|
+
};
|
|
187
|
+
/** page mode: the path that was rendered */
|
|
188
|
+
page?: string;
|
|
189
|
+
/** page mode: the originally-requested path, when it redirected to `page` (trailing slash, i18n, …) */
|
|
190
|
+
redirected_from?: string;
|
|
191
|
+
/** page mode: the redirect was a prerendered page's stub (a meta refresh answered 200) */
|
|
192
|
+
redirect_stub?: true;
|
|
193
|
+
/** page mode: wall ms of the one un-profiled warm-up render (cold module load / cache fill) */
|
|
194
|
+
warmup_ms?: number;
|
|
195
|
+
/** page mode: the HTTP status the profiled renders returned (200 = a real render; 3xx/4xx = not) */
|
|
196
|
+
run_status?: number;
|
|
197
|
+
/** page mode: representative response body size in bytes (a real page is large; a redirect is tiny) */
|
|
198
|
+
run_bytes?: number;
|
|
199
|
+
/** page mode: the timed renders' Cache-Control (what the page tells the browser to keep) */
|
|
200
|
+
run_cache_control?: string;
|
|
201
|
+
/** page mode: a timed render's response set a cookie (no shared cache keeps such a page) */
|
|
202
|
+
run_sets_cookie?: true;
|
|
203
|
+
/** page mode: every render returned the same document, byte for byte */
|
|
204
|
+
same_document?: boolean;
|
|
205
|
+
/** page mode: its route says `export const prerender = true` (the nearest file deciding) —
|
|
206
|
+
* production serves its built HTML file */
|
|
207
|
+
prerendered?: boolean;
|
|
208
|
+
/** page mode: Kit's route id of the timed renders (`/(docs)/docs/[...slug]`) */
|
|
209
|
+
run_route?: string;
|
|
210
|
+
/** page mode: the timed renders answered 200 without the app's handle seeing them: a file the
|
|
211
|
+
* build wrote, served before the app (a prerendered page) */
|
|
212
|
+
run_static?: true;
|
|
213
|
+
/** page mode, when the renders' documents differ: what changes between the first and the last */
|
|
214
|
+
doc_diff?: DocDiff;
|
|
215
|
+
/** page mode: a plain note when the run plan was trimmed to fit the serverless budget */
|
|
216
|
+
budget_note?: string;
|
|
217
|
+
/** page mode: the server's heap was nearly full, so these renders were not made (one more could
|
|
218
|
+
* have ended the process): its use and limit when the profile finished */
|
|
219
|
+
heap_guard?: {
|
|
220
|
+
used_mb: number;
|
|
221
|
+
limit_mb: number;
|
|
222
|
+
skipped: string[];
|
|
223
|
+
};
|
|
224
|
+
/** recorded on AWS Lambda (Amplify's SSR), where a request is billed for its whole duration */
|
|
225
|
+
lambda?: boolean;
|
|
226
|
+
/** on Lambda: the function's memory, MB (it bills memory × wall time) */
|
|
227
|
+
lambda_mb?: number;
|
|
228
|
+
/** the V8 heap limit of the instance, MB: how far a leak can grow before the process dies */
|
|
229
|
+
heap_limit_mb?: number;
|
|
230
|
+
/** the instance it ran on: ms from the process start to its first request (a cold start on
|
|
231
|
+
* Lambda, where an instance starts for a request), Node's own startup within that, its age and
|
|
232
|
+
* the requests it served before this one */
|
|
233
|
+
instance?: {
|
|
234
|
+
first_request_ms: number;
|
|
235
|
+
node_ms: number;
|
|
236
|
+
age_s: number;
|
|
237
|
+
requests_before: number;
|
|
238
|
+
};
|
|
239
|
+
/** page mode: each render run, ms, AS THE APP WOULD HAVE PAID IT — the profiler's own share (its
|
|
240
|
+
* CPU frames, its part of the GC pauses) taken out; `runs_measured` is what the clock said */
|
|
241
|
+
runs?: number[];
|
|
242
|
+
/** page mode: renders another visitor of the same page overlapped — left out of `runs`, their
|
|
243
|
+
* samples set aside (at least one render ran clean) */
|
|
244
|
+
runs_set_aside?: number;
|
|
245
|
+
runs_measured?: number[];
|
|
246
|
+
/** the profiler's own cost inside the window, measured once and kept out of every other number */
|
|
247
|
+
overhead?: {
|
|
248
|
+
cpu_ms: number;
|
|
249
|
+
gc_ms: number;
|
|
250
|
+
per_run_ms: number;
|
|
251
|
+
per_run?: number[];
|
|
252
|
+
note: string;
|
|
253
|
+
};
|
|
254
|
+
/** request mode: the profiled request */
|
|
255
|
+
request?: {
|
|
256
|
+
method: string;
|
|
257
|
+
path: string;
|
|
258
|
+
route: string | null;
|
|
259
|
+
ms: number;
|
|
260
|
+
};
|
|
261
|
+
duration_ms: number;
|
|
262
|
+
sample_interval_us: number;
|
|
263
|
+
/** requests that completed inside the recording window */
|
|
264
|
+
requests: RequestEntry[];
|
|
265
|
+
loop_delay?: {
|
|
266
|
+
p50: number;
|
|
267
|
+
p99: number;
|
|
268
|
+
max: number;
|
|
269
|
+
};
|
|
270
|
+
cpu_percent?: number;
|
|
271
|
+
elu_percent?: number;
|
|
272
|
+
rss_mb?: number;
|
|
273
|
+
node: string;
|
|
274
|
+
/** recorded on the dev server (numbers include Vite's module pipeline) */
|
|
275
|
+
dev?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface UserTiming {
|
|
278
|
+
name: string;
|
|
279
|
+
count: number;
|
|
280
|
+
total_ms: number;
|
|
281
|
+
max_ms: number;
|
|
282
|
+
}
|
|
283
|
+
export interface GcSummary {
|
|
284
|
+
count: number;
|
|
285
|
+
total_ms: number;
|
|
286
|
+
max_ms: number;
|
|
287
|
+
}
|
|
288
|
+
export interface ReportExtras {
|
|
289
|
+
net: NetCall[];
|
|
290
|
+
/** the app's own spans (`span()` from ogygia/profiler) recorded during the window */
|
|
291
|
+
spans?: SpanRecord[];
|
|
292
|
+
heap: HeapAllocator[] | null;
|
|
293
|
+
/** bytes per component (the nearest component above each sampled allocation) */
|
|
294
|
+
heap_components?: {
|
|
295
|
+
name: string;
|
|
296
|
+
bytes: number;
|
|
297
|
+
}[] | null;
|
|
298
|
+
mem: MemSample[];
|
|
299
|
+
/** performance.measure() spans emitted by the app/libraries during the window */
|
|
300
|
+
measures?: UserTiming[];
|
|
301
|
+
/** precise GC pauses from PerformanceObserver (more exact than the sampler) */
|
|
302
|
+
gc?: GcSummary | null;
|
|
303
|
+
/** I/O primitives timed via async_hooks (timers, fs, dns, sockets) */
|
|
304
|
+
io?: IoOp[];
|
|
305
|
+
/** exact call count per function name, from V8 precise coverage */
|
|
306
|
+
call_counts?: Record<string, number>;
|
|
307
|
+
/** bytes of each island module / preload href (a built app; measured after the recording) */
|
|
308
|
+
weights?: Record<string, number>;
|
|
309
|
+
/** what is inside each hashed chunk: a readable source list from the build's handoff */
|
|
310
|
+
contents?: Record<string, string[]>;
|
|
311
|
+
/** each island file's rendered total and heaviest named modules (the build's handoff) */
|
|
312
|
+
heavy?: Record<string, {
|
|
313
|
+
total: number;
|
|
314
|
+
top: {
|
|
315
|
+
name: string;
|
|
316
|
+
bytes: number;
|
|
317
|
+
}[];
|
|
318
|
+
}>;
|
|
319
|
+
/** re-export barrels each island file still holds, with how many modules each brings */
|
|
320
|
+
barrels?: Record<string, {
|
|
321
|
+
name: string;
|
|
322
|
+
fanout: number;
|
|
323
|
+
}[]>;
|
|
324
|
+
/** each island entry's lines that draw differently in the browser (hydration-hazards.ts) */
|
|
325
|
+
hazards?: Record<string, IslandHazard[]>;
|
|
326
|
+
/** the visit's own hole requests from the request log (made after the recording): server ms each */
|
|
327
|
+
/** `name`: the hole's component, from its own request (a hole the profiled render did not have —
|
|
328
|
+
* the visited page's query put it there — is named all the same) */
|
|
329
|
+
hole_requests?: {
|
|
330
|
+
id: string;
|
|
331
|
+
ms: number;
|
|
332
|
+
name?: string;
|
|
333
|
+
p?: string;
|
|
334
|
+
}[];
|
|
335
|
+
/** the visit's in-app navigations, server side: the page request each one made (by its start `t`,
|
|
336
|
+
* the page clock) — its ms, the CPU it burned, its outbound calls */
|
|
337
|
+
nav_requests?: {
|
|
338
|
+
t: number;
|
|
339
|
+
ms: number;
|
|
340
|
+
cpu_ms: number;
|
|
341
|
+
net_ms: number;
|
|
342
|
+
net_count: number;
|
|
343
|
+
inflight?: number;
|
|
344
|
+
}[];
|
|
345
|
+
/** the visit's own document request as the server's handler held it (the request log) */
|
|
346
|
+
doc_request?: {
|
|
347
|
+
ms: number;
|
|
348
|
+
};
|
|
349
|
+
/** browser-side hydration timings joined by fingerprint (the runtime's beacon) */
|
|
350
|
+
client?: ClientIslandStat[];
|
|
351
|
+
/** the page's web vitals from the same beacon */
|
|
352
|
+
vitals?: PageVitals;
|
|
353
|
+
/** the app's own browser marks (`mark()` from ogygia/profiler/client) for the page, per name */
|
|
354
|
+
client_marks?: ClientMarkStat[];
|
|
355
|
+
/** the browser's CPU profile of the page's hydration (the profiler user's latest visit) */
|
|
356
|
+
/** `windows`: the same trace cut to each island's hydrate window and the long tasks outside them */
|
|
357
|
+
client_cpu?: {
|
|
358
|
+
analysis: Analysis;
|
|
359
|
+
at: number;
|
|
360
|
+
sample_ms: number;
|
|
361
|
+
windows?: ClientWindows;
|
|
362
|
+
};
|
|
363
|
+
/** the visit's slowest interaction, sampled: what ran while it waited, and in its handlers */
|
|
364
|
+
interaction_cpu?: InteractionCpu;
|
|
365
|
+
/** a caught request's inputs (path + query, the kept headers): the "profile it again" button */
|
|
366
|
+
replay?: {
|
|
367
|
+
path: string;
|
|
368
|
+
headers: Record<string, string>;
|
|
369
|
+
};
|
|
370
|
+
/** the browser's picture of a visit to this page (the beacon) — the one-clock timeline joins it */
|
|
371
|
+
visit?: Visit;
|
|
372
|
+
/** the modules the build shipped as two copies, each copy's chunk (the build's handoff) */
|
|
373
|
+
dupes?: {
|
|
374
|
+
name: string;
|
|
375
|
+
copies: {
|
|
376
|
+
file: string;
|
|
377
|
+
bytes: number;
|
|
378
|
+
from?: string;
|
|
379
|
+
}[];
|
|
380
|
+
}[];
|
|
381
|
+
/** the latest visit to this page on the other kind of screen (a phone's when `visit` was wide, a
|
|
382
|
+
* wide one's when it was a phone's): what sits below the first screen, or draws nothing, differs */
|
|
383
|
+
other_screen_visit?: Visit;
|
|
384
|
+
/** the latest visit to this page from another browser engine (Safari beside Chrome): findings one
|
|
385
|
+
* engine makes that another never does */
|
|
386
|
+
other_engine_visit?: Visit;
|
|
387
|
+
/** the rendered document as a byte strip */
|
|
388
|
+
strip?: ByteStrip;
|
|
389
|
+
/** every file the document loads at start, weighed through the app (page-assets.ts); a dev
|
|
390
|
+
* server records why it did not weigh instead */
|
|
391
|
+
assets?: PageAssets;
|
|
392
|
+
assets_missing?: string;
|
|
393
|
+
/** calls → loads → page.data keys → islands */
|
|
394
|
+
river?: River;
|
|
395
|
+
/** who caused the GC: each pause joined to the allocations before it */
|
|
396
|
+
gc_attr?: GcAttribution;
|
|
397
|
+
/** promises created in the window (count, sampled creators) */
|
|
398
|
+
promises?: {
|
|
399
|
+
count: number;
|
|
400
|
+
top: {
|
|
401
|
+
caller: string;
|
|
402
|
+
share: number;
|
|
403
|
+
}[];
|
|
404
|
+
};
|
|
405
|
+
/** what one more render left alive after a full collection, by allocation site */
|
|
406
|
+
retained?: Retained;
|
|
407
|
+
/** when the heap grew and what ran then */
|
|
408
|
+
alloc?: AllocTimeline;
|
|
409
|
+
/** the other requests the instance answered while the render ran */
|
|
410
|
+
contention?: Contention;
|
|
411
|
+
/** which component reads which page.data key, from the sources */
|
|
412
|
+
lineage?: Lineage;
|
|
413
|
+
/** the app lines that cost the most, every cost joined per line */
|
|
414
|
+
ledger?: LedgerLine[];
|
|
415
|
+
/** the known slow shapes found on those lines, grouped */
|
|
416
|
+
patterns?: Pattern[];
|
|
417
|
+
/** one render's time as a tree that adds up: phase → owner / call → line (drill.ts) */
|
|
418
|
+
drill?: DrillNode;
|
|
419
|
+
/** one render after every fix named, estimated without counting a saving twice */
|
|
420
|
+
forecast?: Forecast;
|
|
421
|
+
/** a few more renders with a full collection after each: does the heap keep growing? */
|
|
422
|
+
growth?: HeapGrowth;
|
|
423
|
+
}
|
|
424
|
+
/** One `mark()` name as the profiler user's browser reported it for the page. */
|
|
425
|
+
export interface ClientMarkStat {
|
|
426
|
+
name: string;
|
|
427
|
+
n: number;
|
|
428
|
+
p50_ms: number;
|
|
429
|
+
max_ms: number;
|
|
430
|
+
errors: number;
|
|
431
|
+
/** the attribute keys seen on it */
|
|
432
|
+
attr_keys: string[];
|
|
433
|
+
}
|
|
434
|
+
export interface RouteAgg {
|
|
435
|
+
route: string;
|
|
436
|
+
count: number;
|
|
437
|
+
p50: number;
|
|
438
|
+
p95: number;
|
|
439
|
+
max: number;
|
|
440
|
+
avg: number;
|
|
441
|
+
net_p50: number;
|
|
442
|
+
}
|
|
443
|
+
/** A sampled origin that is a dev tool's: `fn (vite)` — a package in the brackets, not a `file:line`. */
|
|
444
|
+
export declare function dev_tool_caller(caller: string): boolean;
|
|
445
|
+
/**
|
|
446
|
+
* Where inside a hot function its time lands, when one line holds the biggest share and it is not
|
|
447
|
+
* the function's own first line: that line, its code, and the function it calls there. Once V8
|
|
448
|
+
* inlines a callee its time is the caller's own — a load "burning" 85 ms is often one call in it
|
|
449
|
+
* (measured on /inferno: newestReview inlined into load, named in one run of six). No regex.
|
|
450
|
+
*/
|
|
451
|
+
export declare function hot_line_of(f: Pick<FrameStat, "name" | "line" | "self_ms" | "lines" | "src">, app_fns: ReadonlySet<string>): {
|
|
452
|
+
line: number;
|
|
453
|
+
ms: number;
|
|
454
|
+
code: string;
|
|
455
|
+
calls?: string;
|
|
456
|
+
} | null;
|
|
457
|
+
/** A render that mostly waited: on its timeline, waiting (calls, and what no hook saw) is 60% of a
|
|
458
|
+
* render of 20 ms or more; with no timeline, the window's CPU under a quarter (the old reading). */
|
|
459
|
+
export declare function mostly_waited(tl: {
|
|
460
|
+
window_ms: number;
|
|
461
|
+
wait_ms: number;
|
|
462
|
+
gap_ms: number;
|
|
463
|
+
} | null | undefined, busy_pct: number): boolean;
|
|
464
|
+
export interface Finding {
|
|
465
|
+
severity: "info" | "warn";
|
|
466
|
+
/** stable machine code, e.g. 'sequential-network' */
|
|
467
|
+
code: string;
|
|
468
|
+
/** one plain-text sentence */
|
|
469
|
+
message: string;
|
|
470
|
+
/** what to do about it, one sentence (a warn usually has one) */
|
|
471
|
+
fix?: string;
|
|
472
|
+
/** the report row it points at: `comp:<name>` / `fn:<key>` — the UI opens that row */
|
|
473
|
+
anchor?: string;
|
|
474
|
+
/** where in the code, when the finding is about one place */
|
|
475
|
+
file?: string;
|
|
476
|
+
line?: number;
|
|
477
|
+
/** the slow pattern (its index in the report's `patterns`) that explains this same problem */
|
|
478
|
+
pattern?: number;
|
|
479
|
+
/** the islands a browser finding is about, by fingerprint (the devtools light them up) */
|
|
480
|
+
fps?: string[];
|
|
481
|
+
}
|
|
482
|
+
/** A URL path with its variable segments (numbers, uuids, hashes, long tokens) folded to `:id`. */
|
|
483
|
+
export declare function path_template(url: string): {
|
|
484
|
+
host: string;
|
|
485
|
+
tpl: string;
|
|
486
|
+
};
|
|
487
|
+
/** N+1 shapes: the same endpoint hit once per item. */
|
|
488
|
+
export declare function n_plus_one(net: NetCall[], min?: number): {
|
|
489
|
+
host: string;
|
|
490
|
+
tpl: string;
|
|
491
|
+
count: number;
|
|
492
|
+
ms: number;
|
|
493
|
+
}[];
|
|
494
|
+
/** The plain-language bottleneck read, as structured data. The HTML verdict and
|
|
495
|
+
* the JSON report both render from this, so they never drift. */
|
|
496
|
+
/** THE PAGE'S WEIGHT, as findings: the JS it runs at start (and what the biggest files hold), what
|
|
497
|
+
* blocks the first paint, the code kept for later. From page-assets.ts — the score reads the same. */
|
|
498
|
+
/** The page's own origin, from its weighed files: its islands' (always same-origin), else its first
|
|
499
|
+
* script's. '' when nothing was weighed. */
|
|
500
|
+
export declare function page_origin(pa: PageAssets | undefined): string;
|
|
501
|
+
/**
|
|
502
|
+
* THE PAGE'S JS AT START, as the score and the findings both read it: the files weighed from the
|
|
503
|
+
* HTML and their imports, plus the scripts the profiler user's own browser loaded at runtime that
|
|
504
|
+
* nothing in the HTML names (runtime_scripts — a CDN library fetching its parts, a runtime's
|
|
505
|
+
* on-demand chunk). Without the second half, a page that loads its JS from a script weighed light.
|
|
506
|
+
*/
|
|
507
|
+
export declare function start_js(extras: Pick<ReportExtras, "assets" | "visit">): {
|
|
508
|
+
js: number;
|
|
509
|
+
js_wire: number;
|
|
510
|
+
js_files: number;
|
|
511
|
+
runtime: RuntimeScripts | null;
|
|
512
|
+
woke_early: {
|
|
513
|
+
bytes: number;
|
|
514
|
+
wire: number;
|
|
515
|
+
files: number;
|
|
516
|
+
} | null;
|
|
517
|
+
/** the ogygia runtime's on-demand parts the visit loaded at start (as its islands woke) */
|
|
518
|
+
runtime_parts: {
|
|
519
|
+
bytes: number;
|
|
520
|
+
wire: number;
|
|
521
|
+
files: number;
|
|
522
|
+
} | null;
|
|
523
|
+
} | null;
|
|
524
|
+
/** The modules the build shipped twice whose copies are both in files this page loads (its weighed
|
|
525
|
+
* files and its visit's scripts), each with the bytes the second copy costs; the costliest first. */
|
|
526
|
+
export declare function page_duplicates(extras: Pick<ReportExtras, "dupes" | "assets" | "visit">): {
|
|
527
|
+
name: string;
|
|
528
|
+
copies: {
|
|
529
|
+
file: string;
|
|
530
|
+
bytes: number;
|
|
531
|
+
from?: string;
|
|
532
|
+
}[];
|
|
533
|
+
extra: number;
|
|
534
|
+
}[];
|
|
535
|
+
/** What a browser hid, from what the report knows itself. Safari reports each of another origin's
|
|
536
|
+
* files as 0 bytes (Timing-Allow-Origin or not): the report weighed the files the page names and
|
|
537
|
+
* their imports, and a visit from another engine measured what scripts loaded — a hidden size takes
|
|
538
|
+
* the weight, marked. And only Chromium says which files held the first paint: for another engine,
|
|
539
|
+
* the files the HTML makes blocking (a head stylesheet, a classic sync script) are marked so. And a
|
|
540
|
+
* font downloaded again takes the Vary header the weighing read (the cause, in Safari, with Origin). */
|
|
541
|
+
export declare function with_hidden_filled(v: Visit, origin: string | undefined, assets: PageAssets | undefined, other: Visit | undefined): Visit;
|
|
542
|
+
/** A remote function's name from its call's address (`/<appDir>/remote/<file hash>/<name>/<argument>`),
|
|
543
|
+
* or the address when it is not one. */
|
|
544
|
+
export declare function remote_function_name(path: string): string;
|
|
545
|
+
export declare function derive_findings(a: Analysis, meta: ReportMeta, extras: ReportExtras): Finding[];
|
|
546
|
+
/**
|
|
547
|
+
* A finding that a slow pattern already explains points at it (`pattern`, its index), so the two
|
|
548
|
+
* read as one problem: a finding and a pattern share a code line (a site, a caller line, or the
|
|
549
|
+
* function a site sits in), the row the finding opens is a site's function, or a network finding
|
|
550
|
+
* names the calls a waits-in-a-row site made. Nothing is hidden; the finding gains the link.
|
|
551
|
+
*/
|
|
552
|
+
export declare function link_patterns(findings: Finding[], patterns: readonly Pattern[], a: Pick<Analysis, "functions" | "components">): void;
|
|
553
|
+
/** The island rows of the profiled page: the page request that recorded them (detail is on only
|
|
554
|
+
* while the profiler records, so the internal render carries them). */
|
|
555
|
+
export declare function island_rows_of(meta: ReportMeta): IslandStat[];
|
|
556
|
+
/**
|
|
557
|
+
* THE ISLAND HOST WRAPPERS by name. The compiler wraps every island in a virtual
|
|
558
|
+
* `wrapper/<id>.svelte`, and Svelte names that function after the file: `_b95bfb97fab` (the id
|
|
559
|
+
* minus its first character, made an identifier). The island rows know the id (in the entry URL)
|
|
560
|
+
* and the component: this returns the `rename` hook `analyze()` takes, so the wrapper reads
|
|
561
|
+
* `ProductCard (island host)` in every table, stack and flame. Rows come from every request in
|
|
562
|
+
* the window (a page profile's own render, a trapped page, a header-profiled request).
|
|
563
|
+
*/
|
|
564
|
+
export declare function island_host_renamer(requests: readonly RequestEntry[]): ((name: string, url: string) => string | undefined) | undefined;
|
|
565
|
+
/** What to call a hole: its component and props (`Recommendations {"forProduct":"P1"}`), else its id. */
|
|
566
|
+
export declare function hole_label(h: Pick<HoleStat, "id" | "name" | "props">): string;
|
|
567
|
+
/** The hole endpoint requests in the window, per hole id: hits / misses / uncached renders. */
|
|
568
|
+
export declare function hole_economics(meta: ReportMeta): Map<string, {
|
|
569
|
+
id: string;
|
|
570
|
+
hit: number;
|
|
571
|
+
miss: number;
|
|
572
|
+
none: number;
|
|
573
|
+
ms: number;
|
|
574
|
+
ttl: number;
|
|
575
|
+
}>;
|
|
576
|
+
/** The display name of an island: its component's name when the row carries it, else the
|
|
577
|
+
* entry's basename (`ProductCard` from `.../ProductCard.svelte`; a built facade keeps its file). */
|
|
578
|
+
export declare function island_name(row: Pick<IslandStat, "entry" | "name"> | string): string;
|
|
579
|
+
/**
|
|
580
|
+
* ONE ROW PER ISLAND: the tail records a row per fingerprint (a list of 48 cards is 48 props
|
|
581
|
+
* sidecars, one each), and the fingerprint is what the browser's beacon joins on — but the table
|
|
582
|
+
* and the findings speak of the island. Rows with the same entry and wake merge: copies and
|
|
583
|
+
* bytes add up, references and hints union, the first devalue culprit stands for all, and
|
|
584
|
+
* `variants` says how many fingerprints went in.
|
|
585
|
+
*/
|
|
586
|
+
export declare function group_islands(rows: readonly IslandStat[]): IslandStat[];
|
|
587
|
+
export declare function island_js_bytes(row: IslandStat, weights: Record<string, number> | undefined): number | null;
|
|
588
|
+
/**
|
|
589
|
+
* WHAT MAKING SOME ISLANDS LAKES SAVES: the bytes of their closures (each chunk once) that no other
|
|
590
|
+
* waking island on the page loads — a shared chunk (the framework's runtime) another island needs
|
|
591
|
+
* downloads anyway. `loads`: their closures, each chunk once. Null without the build's weights.
|
|
592
|
+
*/
|
|
593
|
+
export declare function lake_saving(them: readonly IslandStat[], rows: readonly IslandStat[], weights: Record<string, number> | undefined): {
|
|
594
|
+
loads: number;
|
|
595
|
+
saves: number;
|
|
596
|
+
} | null;
|
|
597
|
+
/**
|
|
598
|
+
* WHAT ONLY EACH ISLAND NEEDS: of an island's closure (its entry and chunks), the bytes no other
|
|
599
|
+
* waking island on the page uses — what dropping (or deferring) that island would really save.
|
|
600
|
+
* `island_js_bytes` counts shared chunks once per island; this counts each once, where it belongs.
|
|
601
|
+
* Keyed by entry (copies of one island are one closure). Null without the build's weights.
|
|
602
|
+
*/
|
|
603
|
+
export declare function island_js_unique(rows: readonly IslandStat[], weights: Record<string, number> | undefined): Map<string, number> | null;
|
|
604
|
+
/** Kit-shaped findings: the load lanes and the parent() chain, universal loads, and the client
|
|
605
|
+
* router's serialization of load data. */
|
|
606
|
+
/** ms of devalue work done for Kit's copy of the server load data: each devalue function's own time,
|
|
607
|
+
* by the share of its call paths that pass through Kit's serializer (`add_node`, data_serializer.js,
|
|
608
|
+
* or render_response). A function with no recorded paths counts only when it is `uneval` itself. */
|
|
609
|
+
export declare function kit_load_serialize_ms(a: Analysis): number;
|
|
610
|
+
/** Cold vs warm per file: what the first render paid over a warm one (module load + compile). */
|
|
611
|
+
export declare function cold_rows(a: Analysis, meta: ReportMeta): {
|
|
612
|
+
file: string;
|
|
613
|
+
category: FrameCategory;
|
|
614
|
+
cold_ms: number;
|
|
615
|
+
warm_ms: number;
|
|
616
|
+
extra_ms: number;
|
|
617
|
+
}[];
|
|
618
|
+
/** The spread of a component across runs: median of the rest against the max, and the cold first run. */
|
|
619
|
+
export declare function run_spread(runs_ms: number[]): {
|
|
620
|
+
min: number;
|
|
621
|
+
median: number;
|
|
622
|
+
max: number;
|
|
623
|
+
max_run: number;
|
|
624
|
+
after: number;
|
|
625
|
+
cold: boolean;
|
|
626
|
+
} | null;
|
|
627
|
+
/** Do the runs climb? The page getting slower render by render — what a page that keeps memory, or
|
|
628
|
+
* a cache that grows without a bound, does to an instance as it ages. The slope is the median of
|
|
629
|
+
* every pair's slope (one slow run cannot tilt it), and it counts only when most pairs agree: at
|
|
630
|
+
* least 3 of 4 later runs slower than an earlier one. A cold first run is left out (that is the
|
|
631
|
+
* cold start, not a climb). Needs 4 runs; null when the runs do not climb. */
|
|
632
|
+
export declare function run_trend(runs_ms: readonly number[]): {
|
|
633
|
+
from: number;
|
|
634
|
+
to: number;
|
|
635
|
+
slope_ms: number;
|
|
636
|
+
rise_ms: number;
|
|
637
|
+
rise_pct: number;
|
|
638
|
+
agree: number;
|
|
639
|
+
runs: number;
|
|
640
|
+
} | null;
|
|
641
|
+
/** Gather the ogygia signals a page score reads — the same numbers the findings above compute, so
|
|
642
|
+
* the score and the findings never disagree. All safe when a signal is absent (no visits, no server
|
|
643
|
+
* timing). See {@link page_score}. */
|
|
644
|
+
export declare function page_score_of(meta: ReportMeta, extras: ReportExtras): PageScore;
|
|
645
|
+
/** The JSON report (`?as=json`, the testing engine, the MCP tool): the written-out shape of what
|
|
646
|
+
* `report_json` builds. The compiler checks the two against each other. */
|
|
647
|
+
export type ReportJson = {
|
|
648
|
+
target: {
|
|
649
|
+
runs: number[] | null;
|
|
650
|
+
warmup_ms: number | null;
|
|
651
|
+
run_status: number | null;
|
|
652
|
+
run_bytes: number | null;
|
|
653
|
+
cache_control: string | null;
|
|
654
|
+
prerendered: string | null;
|
|
655
|
+
budget_note: string | null;
|
|
656
|
+
runs_measured: number[] | null;
|
|
657
|
+
instance: {
|
|
658
|
+
first_request_ms: number;
|
|
659
|
+
node_ms: number;
|
|
660
|
+
age_s: number;
|
|
661
|
+
requests_before: number;
|
|
662
|
+
} | null;
|
|
663
|
+
lambda: boolean;
|
|
664
|
+
request: {
|
|
665
|
+
method: string;
|
|
666
|
+
path: string;
|
|
667
|
+
route: string | null;
|
|
668
|
+
ms: number;
|
|
669
|
+
} | null;
|
|
670
|
+
redirect_stub?: boolean | undefined;
|
|
671
|
+
page: string | null;
|
|
672
|
+
redirected_from: string | null;
|
|
673
|
+
};
|
|
674
|
+
summary: {
|
|
675
|
+
window_ms: number;
|
|
676
|
+
busy_ms: number;
|
|
677
|
+
overhead: {
|
|
678
|
+
top: {
|
|
679
|
+
name: string;
|
|
680
|
+
url: string;
|
|
681
|
+
line: number;
|
|
682
|
+
self_ms: number;
|
|
683
|
+
}[];
|
|
684
|
+
cpu_ms: number;
|
|
685
|
+
gc_ms: number;
|
|
686
|
+
per_run_ms: number;
|
|
687
|
+
per_run?: number[];
|
|
688
|
+
note: string;
|
|
689
|
+
} | null;
|
|
690
|
+
busy_pct: number;
|
|
691
|
+
idle_ms: number;
|
|
692
|
+
gc_ms: number;
|
|
693
|
+
gc_sampled_ms: number;
|
|
694
|
+
verdict: string;
|
|
695
|
+
sample_count: number;
|
|
696
|
+
cpu_percent: number | null;
|
|
697
|
+
elu_percent: number | null;
|
|
698
|
+
loop_delay_ms: {
|
|
699
|
+
p50: number;
|
|
700
|
+
p99: number;
|
|
701
|
+
max: number;
|
|
702
|
+
} | null;
|
|
703
|
+
rss_mb: number | null;
|
|
704
|
+
};
|
|
705
|
+
score: PageScore;
|
|
706
|
+
findings: Finding[];
|
|
707
|
+
budget: {
|
|
708
|
+
label: string;
|
|
709
|
+
category: FrameCategory;
|
|
710
|
+
ms: number;
|
|
711
|
+
pct: number;
|
|
712
|
+
}[];
|
|
713
|
+
timeline: {
|
|
714
|
+
window_ms: number;
|
|
715
|
+
cpu_ms: number;
|
|
716
|
+
wait_ms: number;
|
|
717
|
+
unaccounted_ms: number;
|
|
718
|
+
phases: {
|
|
719
|
+
phase: Phase;
|
|
720
|
+
label: string;
|
|
721
|
+
cpu_ms: number;
|
|
722
|
+
wait_ms: number;
|
|
723
|
+
}[];
|
|
724
|
+
steps: {
|
|
725
|
+
at_ms: number;
|
|
726
|
+
ms: number;
|
|
727
|
+
pct: number;
|
|
728
|
+
kind: "wait" | "cpu" | "gap";
|
|
729
|
+
phase: Phase;
|
|
730
|
+
what: string;
|
|
731
|
+
detail: string | null;
|
|
732
|
+
file: string | null;
|
|
733
|
+
calls: {
|
|
734
|
+
label: string;
|
|
735
|
+
ms: number;
|
|
736
|
+
caller?: string;
|
|
737
|
+
callers?: string[];
|
|
738
|
+
timings?: TimelineCall["timings"];
|
|
739
|
+
body_ms?: number;
|
|
740
|
+
}[] | null;
|
|
741
|
+
within: string | null;
|
|
742
|
+
}[];
|
|
743
|
+
parallelizable: {
|
|
744
|
+
calls: string[];
|
|
745
|
+
ms: number;
|
|
746
|
+
save_ms: number;
|
|
747
|
+
}[];
|
|
748
|
+
lanes: {
|
|
749
|
+
file: string;
|
|
750
|
+
level: "error" | "page" | "layout";
|
|
751
|
+
kind: "server" | "universal";
|
|
752
|
+
t0_ms: number;
|
|
753
|
+
t1_ms: number;
|
|
754
|
+
cpu_ms: number;
|
|
755
|
+
wait_ms: number;
|
|
756
|
+
awaited_parent: boolean;
|
|
757
|
+
}[];
|
|
758
|
+
chain: LoadChain | null;
|
|
759
|
+
awaits: AwaitEdge[];
|
|
760
|
+
} | null;
|
|
761
|
+
spans: SpanRow[];
|
|
762
|
+
paths: {
|
|
763
|
+
owner: {
|
|
764
|
+
name: string;
|
|
765
|
+
file: string;
|
|
766
|
+
line: number;
|
|
767
|
+
category: FrameCategory;
|
|
768
|
+
total_ms: number;
|
|
769
|
+
calls: number | null;
|
|
770
|
+
};
|
|
771
|
+
ms: number;
|
|
772
|
+
pct_busy: number;
|
|
773
|
+
share_of_owner: number;
|
|
774
|
+
functions: {
|
|
775
|
+
name: string;
|
|
776
|
+
file: string;
|
|
777
|
+
line: number;
|
|
778
|
+
category: FrameCategory;
|
|
779
|
+
package: string | null;
|
|
780
|
+
ms: number;
|
|
781
|
+
}[];
|
|
782
|
+
tree: PathNode;
|
|
783
|
+
}[];
|
|
784
|
+
ogygia: {
|
|
785
|
+
island_rows: {
|
|
786
|
+
client: {
|
|
787
|
+
reason?: string | undefined;
|
|
788
|
+
hydrations: number;
|
|
789
|
+
p50_ms: number;
|
|
790
|
+
max_ms: number;
|
|
791
|
+
load_p50_ms: number;
|
|
792
|
+
recovered: number;
|
|
793
|
+
} | null;
|
|
794
|
+
hazards?: IslandHazard[] | undefined;
|
|
795
|
+
name: string;
|
|
796
|
+
entry: string;
|
|
797
|
+
fp: string;
|
|
798
|
+
fingerprints: number;
|
|
799
|
+
copies: number;
|
|
800
|
+
wake: string;
|
|
801
|
+
ssr_ms: number | null;
|
|
802
|
+
props_bytes: number;
|
|
803
|
+
canonical_bytes: number;
|
|
804
|
+
json: boolean;
|
|
805
|
+
devalue_culprit: string | null;
|
|
806
|
+
seed_refs: number;
|
|
807
|
+
seed_ref_keys: string[];
|
|
808
|
+
js_bytes: number | null;
|
|
809
|
+
js_only_bytes: number | null;
|
|
810
|
+
modules: string[];
|
|
811
|
+
interactivity: import("@ogygia/core/internal/server").IslandInteractivity | null;
|
|
812
|
+
}[];
|
|
813
|
+
seed: {
|
|
814
|
+
keys: import("@ogygia/core/internal/server").SeedKeyStat[];
|
|
815
|
+
whole_by: string[];
|
|
816
|
+
} | null;
|
|
817
|
+
hole_rows: {
|
|
818
|
+
id: string;
|
|
819
|
+
component: string | null;
|
|
820
|
+
props: string | null;
|
|
821
|
+
when: string;
|
|
822
|
+
hydrate: string | null;
|
|
823
|
+
max_age_s: number;
|
|
824
|
+
copies: number;
|
|
825
|
+
requests: {
|
|
826
|
+
hit: number;
|
|
827
|
+
miss: number;
|
|
828
|
+
uncached: number;
|
|
829
|
+
avg_ms: number;
|
|
830
|
+
} | null;
|
|
831
|
+
}[];
|
|
832
|
+
transform_ms: number;
|
|
833
|
+
islands: number;
|
|
834
|
+
hints: number;
|
|
835
|
+
holes: number;
|
|
836
|
+
seed_bytes: number;
|
|
837
|
+
remote_seed_bytes: number;
|
|
838
|
+
tail_bytes: number;
|
|
839
|
+
fnm_bytes: number;
|
|
840
|
+
ctx_bytes: number;
|
|
841
|
+
seed_json: boolean;
|
|
842
|
+
seed_culprit?: string | null;
|
|
843
|
+
} | null;
|
|
844
|
+
kit: {
|
|
845
|
+
uneval_ms: number;
|
|
846
|
+
etag_ms: number;
|
|
847
|
+
};
|
|
848
|
+
components: {
|
|
849
|
+
name: string;
|
|
850
|
+
instances: number | null;
|
|
851
|
+
file: string;
|
|
852
|
+
path: string;
|
|
853
|
+
line: number;
|
|
854
|
+
column: number | null;
|
|
855
|
+
self_ms: number;
|
|
856
|
+
total_ms: number;
|
|
857
|
+
per_call_ms: number | null;
|
|
858
|
+
pct_busy: number;
|
|
859
|
+
alloc_bytes: number | null;
|
|
860
|
+
markup_ms: number | null;
|
|
861
|
+
logic_ms: number | null;
|
|
862
|
+
parent: string | null;
|
|
863
|
+
runs_ms: number[] | null;
|
|
864
|
+
hot_lines: {
|
|
865
|
+
line: number;
|
|
866
|
+
ms: number;
|
|
867
|
+
}[] | null;
|
|
868
|
+
source: {
|
|
869
|
+
start: number;
|
|
870
|
+
lines: string[];
|
|
871
|
+
} | null;
|
|
872
|
+
callees: Callee[] | null;
|
|
873
|
+
stacks: {
|
|
874
|
+
ms: number;
|
|
875
|
+
frames: string[];
|
|
876
|
+
}[];
|
|
877
|
+
}[];
|
|
878
|
+
hot_functions: {
|
|
879
|
+
name: string;
|
|
880
|
+
label: string | null;
|
|
881
|
+
instances: number | null;
|
|
882
|
+
file: string;
|
|
883
|
+
path: string;
|
|
884
|
+
line: number;
|
|
885
|
+
column: number | null;
|
|
886
|
+
category: FrameCategory;
|
|
887
|
+
package: string | null;
|
|
888
|
+
self_ms: number;
|
|
889
|
+
total_ms: number;
|
|
890
|
+
per_call_ms: number | null;
|
|
891
|
+
stacks: {
|
|
892
|
+
ms: number;
|
|
893
|
+
frames: string[];
|
|
894
|
+
}[];
|
|
895
|
+
hot_lines: {
|
|
896
|
+
line: number;
|
|
897
|
+
ms: number;
|
|
898
|
+
}[] | null;
|
|
899
|
+
source: {
|
|
900
|
+
start: number;
|
|
901
|
+
lines: string[];
|
|
902
|
+
} | null;
|
|
903
|
+
callees: Callee[] | null;
|
|
904
|
+
}[];
|
|
905
|
+
files: {
|
|
906
|
+
file: string;
|
|
907
|
+
category: FrameCategory;
|
|
908
|
+
self_ms: number;
|
|
909
|
+
pct_busy: number;
|
|
910
|
+
}[];
|
|
911
|
+
network: {
|
|
912
|
+
count: number;
|
|
913
|
+
total_ms: number;
|
|
914
|
+
sequential_ms: number;
|
|
915
|
+
errors: number;
|
|
916
|
+
hosts: {
|
|
917
|
+
host: string;
|
|
918
|
+
calls: number;
|
|
919
|
+
total_ms: number;
|
|
920
|
+
p50_ms: number;
|
|
921
|
+
max_ms: number;
|
|
922
|
+
errors: number;
|
|
923
|
+
}[];
|
|
924
|
+
calls: {
|
|
925
|
+
method: string;
|
|
926
|
+
url: string;
|
|
927
|
+
host: string;
|
|
928
|
+
status: number;
|
|
929
|
+
wait_ms: number;
|
|
930
|
+
body_ms: number | null;
|
|
931
|
+
bytes: number | null;
|
|
932
|
+
transfer_bytes: number | null;
|
|
933
|
+
encoding: string | null;
|
|
934
|
+
type: string | null;
|
|
935
|
+
req_bytes: number | null;
|
|
936
|
+
req_payload: string | null;
|
|
937
|
+
route: string | null;
|
|
938
|
+
caller: string | null;
|
|
939
|
+
callers: string[] | null;
|
|
940
|
+
server_timing: ServerTiming[] | null;
|
|
941
|
+
trace: UpstreamTrace | null;
|
|
942
|
+
headers: Record<string, string> | null;
|
|
943
|
+
error: string | null;
|
|
944
|
+
}[];
|
|
945
|
+
};
|
|
946
|
+
cold: {
|
|
947
|
+
calls?: number | undefined;
|
|
948
|
+
ms: number;
|
|
949
|
+
busy_ms: number;
|
|
950
|
+
files: {
|
|
951
|
+
file: string;
|
|
952
|
+
category: FrameCategory;
|
|
953
|
+
cold_ms: number;
|
|
954
|
+
warm_ms: number;
|
|
955
|
+
extra_ms: number;
|
|
956
|
+
}[];
|
|
957
|
+
} | null;
|
|
958
|
+
browser: {
|
|
959
|
+
cpu?: {
|
|
960
|
+
components: {
|
|
961
|
+
name: string;
|
|
962
|
+
file: string;
|
|
963
|
+
self_ms: number;
|
|
964
|
+
total_ms: number;
|
|
965
|
+
instances: number | null;
|
|
966
|
+
}[];
|
|
967
|
+
hot_functions: {
|
|
968
|
+
name: string;
|
|
969
|
+
file: string;
|
|
970
|
+
line: number;
|
|
971
|
+
category: FrameCategory;
|
|
972
|
+
package: string | null;
|
|
973
|
+
self_ms: number;
|
|
974
|
+
total_ms: number;
|
|
975
|
+
}[];
|
|
976
|
+
by_island?: {
|
|
977
|
+
fp: string;
|
|
978
|
+
name: string | null;
|
|
979
|
+
ms: number;
|
|
980
|
+
top: WindowFn[];
|
|
981
|
+
}[] | undefined;
|
|
982
|
+
outside_islands?: {
|
|
983
|
+
ms: number;
|
|
984
|
+
top: WindowFn[];
|
|
985
|
+
} | undefined;
|
|
986
|
+
at: number;
|
|
987
|
+
sampled_ms: number;
|
|
988
|
+
busy_ms: number;
|
|
989
|
+
} | undefined;
|
|
990
|
+
interaction_cpu?: InteractionCpu | undefined;
|
|
991
|
+
visit?: {
|
|
992
|
+
longtasks: number;
|
|
993
|
+
islands: {
|
|
994
|
+
changed?: boolean | undefined;
|
|
995
|
+
fp: string;
|
|
996
|
+
t0: number;
|
|
997
|
+
loaded: number;
|
|
998
|
+
done: number;
|
|
999
|
+
}[];
|
|
1000
|
+
firsts: {
|
|
1001
|
+
fp: string;
|
|
1002
|
+
t: number;
|
|
1003
|
+
type: string;
|
|
1004
|
+
}[];
|
|
1005
|
+
shifts: number;
|
|
1006
|
+
cls_by_island: {
|
|
1007
|
+
[k: string]: number;
|
|
1008
|
+
};
|
|
1009
|
+
resource_totals?: {
|
|
1010
|
+
type: string;
|
|
1011
|
+
count: number;
|
|
1012
|
+
transfer: number;
|
|
1013
|
+
size: number;
|
|
1014
|
+
}[] | undefined;
|
|
1015
|
+
at: number;
|
|
1016
|
+
nav: VisitNav;
|
|
1017
|
+
paints: {
|
|
1018
|
+
fcp?: number;
|
|
1019
|
+
lcp?: number;
|
|
1020
|
+
lcp_fp?: string;
|
|
1021
|
+
lcp_url?: string;
|
|
1022
|
+
lcp_tag?: string;
|
|
1023
|
+
lcp_replaced?: true;
|
|
1024
|
+
lcp_lazy?: true;
|
|
1025
|
+
lcp_priority?: "high" | "low";
|
|
1026
|
+
held?: {
|
|
1027
|
+
outcome: "arrived" | "input" | "cap" | "none";
|
|
1028
|
+
resources: number;
|
|
1029
|
+
waited_ms: number;
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
resources: number;
|
|
1033
|
+
resource_bytes: number;
|
|
1034
|
+
} | undefined;
|
|
1035
|
+
marks?: ClientMarkStat[] | undefined;
|
|
1036
|
+
n?: number | undefined;
|
|
1037
|
+
ttfb?: number | null | undefined;
|
|
1038
|
+
fcp?: number | null | undefined;
|
|
1039
|
+
lcp?: number | null | undefined;
|
|
1040
|
+
cls?: number | null | undefined;
|
|
1041
|
+
inp?: number | null | undefined;
|
|
1042
|
+
} | null;
|
|
1043
|
+
replay: {
|
|
1044
|
+
url: string;
|
|
1045
|
+
path: string;
|
|
1046
|
+
headers: string[];
|
|
1047
|
+
} | null;
|
|
1048
|
+
assets: ReportJsonAssets | {
|
|
1049
|
+
missing: string;
|
|
1050
|
+
} | null;
|
|
1051
|
+
strip: {
|
|
1052
|
+
tail?: StreamTail | undefined;
|
|
1053
|
+
chunks?: {
|
|
1054
|
+
end: number;
|
|
1055
|
+
t: number;
|
|
1056
|
+
}[] | undefined;
|
|
1057
|
+
total: number;
|
|
1058
|
+
by_kind: Partial<Record<StripKind, number>>;
|
|
1059
|
+
shadow_count: number;
|
|
1060
|
+
segments: StripSegment[];
|
|
1061
|
+
} | null;
|
|
1062
|
+
river: River | null;
|
|
1063
|
+
memory: {
|
|
1064
|
+
rss_start_mb: number;
|
|
1065
|
+
rss_end_mb: number | null;
|
|
1066
|
+
growth_mb: number;
|
|
1067
|
+
gc: GcSummary | null;
|
|
1068
|
+
gc_attribution: {
|
|
1069
|
+
pauses: {
|
|
1070
|
+
t_ms: number;
|
|
1071
|
+
ms: number;
|
|
1072
|
+
ms_measured: number;
|
|
1073
|
+
kind: "other" | "minor" | "major" | "incremental" | "weak";
|
|
1074
|
+
forced: boolean;
|
|
1075
|
+
since_ms: number;
|
|
1076
|
+
allocated_bytes: number;
|
|
1077
|
+
estimated: boolean;
|
|
1078
|
+
why: string;
|
|
1079
|
+
running: {
|
|
1080
|
+
label: string;
|
|
1081
|
+
category: string;
|
|
1082
|
+
file?: string;
|
|
1083
|
+
} | null;
|
|
1084
|
+
top: {
|
|
1085
|
+
name: string;
|
|
1086
|
+
component: string | null;
|
|
1087
|
+
bytes: number;
|
|
1088
|
+
share: number;
|
|
1089
|
+
}[];
|
|
1090
|
+
}[];
|
|
1091
|
+
makers: {
|
|
1092
|
+
name: string;
|
|
1093
|
+
file: string;
|
|
1094
|
+
line: number;
|
|
1095
|
+
category: FrameCategory;
|
|
1096
|
+
component: string | null;
|
|
1097
|
+
via: string | null;
|
|
1098
|
+
allocated_bytes: number;
|
|
1099
|
+
share: number;
|
|
1100
|
+
gc_ms: number;
|
|
1101
|
+
pauses: number;
|
|
1102
|
+
}[];
|
|
1103
|
+
components: {
|
|
1104
|
+
name: string;
|
|
1105
|
+
allocated: number;
|
|
1106
|
+
gc_ms: number;
|
|
1107
|
+
}[];
|
|
1108
|
+
count: number;
|
|
1109
|
+
total_ms: number;
|
|
1110
|
+
max_ms: number;
|
|
1111
|
+
measured_ms: number;
|
|
1112
|
+
overhead_ms: number;
|
|
1113
|
+
minor: number;
|
|
1114
|
+
major: number;
|
|
1115
|
+
incremental: number;
|
|
1116
|
+
weak: number;
|
|
1117
|
+
allocated_mb: number;
|
|
1118
|
+
alloc_rate_mb_s: number;
|
|
1119
|
+
retained_mb?: number;
|
|
1120
|
+
slices: number;
|
|
1121
|
+
slice_ms: number;
|
|
1122
|
+
} | null;
|
|
1123
|
+
allocators: {
|
|
1124
|
+
name: string;
|
|
1125
|
+
file: string;
|
|
1126
|
+
line: number;
|
|
1127
|
+
category: FrameCategory;
|
|
1128
|
+
self_bytes: number;
|
|
1129
|
+
total_bytes: number;
|
|
1130
|
+
}[];
|
|
1131
|
+
by_component: {
|
|
1132
|
+
name: string;
|
|
1133
|
+
bytes: number;
|
|
1134
|
+
}[];
|
|
1135
|
+
samples: {
|
|
1136
|
+
t_ms: number;
|
|
1137
|
+
rss_mb: number;
|
|
1138
|
+
heap_used_mb: number;
|
|
1139
|
+
}[];
|
|
1140
|
+
};
|
|
1141
|
+
deopts: {
|
|
1142
|
+
name: string;
|
|
1143
|
+
file: string;
|
|
1144
|
+
line: number;
|
|
1145
|
+
category: FrameCategory;
|
|
1146
|
+
self_ms: number;
|
|
1147
|
+
count: number;
|
|
1148
|
+
reasons: Record<string, number>;
|
|
1149
|
+
}[];
|
|
1150
|
+
sync_io: {
|
|
1151
|
+
name: string;
|
|
1152
|
+
module: string;
|
|
1153
|
+
self_ms: number;
|
|
1154
|
+
total_ms: number;
|
|
1155
|
+
calls: number | null;
|
|
1156
|
+
callers: string[];
|
|
1157
|
+
}[];
|
|
1158
|
+
memo_candidates: MemoCandidate[];
|
|
1159
|
+
promises: {
|
|
1160
|
+
count: number;
|
|
1161
|
+
per_render: number;
|
|
1162
|
+
top: {
|
|
1163
|
+
caller: string;
|
|
1164
|
+
share: number;
|
|
1165
|
+
}[];
|
|
1166
|
+
} | null;
|
|
1167
|
+
retained: {
|
|
1168
|
+
total_bytes: number;
|
|
1169
|
+
render_ms: number;
|
|
1170
|
+
sites: {
|
|
1171
|
+
name: string;
|
|
1172
|
+
file: string;
|
|
1173
|
+
line: number;
|
|
1174
|
+
via: string | null;
|
|
1175
|
+
component: string | null;
|
|
1176
|
+
bytes: number;
|
|
1177
|
+
share: number;
|
|
1178
|
+
}[];
|
|
1179
|
+
} | null;
|
|
1180
|
+
steps: RenderSteps | null;
|
|
1181
|
+
stacks: {
|
|
1182
|
+
window_ms: number;
|
|
1183
|
+
raw_samples: number;
|
|
1184
|
+
frames: {
|
|
1185
|
+
name: string;
|
|
1186
|
+
file: string | null;
|
|
1187
|
+
category: FrameCategory;
|
|
1188
|
+
parent: number;
|
|
1189
|
+
}[];
|
|
1190
|
+
t_ms: number[];
|
|
1191
|
+
d_ms: number[];
|
|
1192
|
+
leaf: number[];
|
|
1193
|
+
} | null;
|
|
1194
|
+
alloc: {
|
|
1195
|
+
grown_mb: number;
|
|
1196
|
+
period_ms: number;
|
|
1197
|
+
longest_gap_ms: number;
|
|
1198
|
+
window: {
|
|
1199
|
+
offset_ms: number;
|
|
1200
|
+
ms: number;
|
|
1201
|
+
} | null;
|
|
1202
|
+
bursts: {
|
|
1203
|
+
t0_ms: number;
|
|
1204
|
+
t1_ms: number;
|
|
1205
|
+
mb: number;
|
|
1206
|
+
mb_per_s: number;
|
|
1207
|
+
gc_inside: boolean;
|
|
1208
|
+
running: {
|
|
1209
|
+
label: string;
|
|
1210
|
+
category: string;
|
|
1211
|
+
file?: string;
|
|
1212
|
+
share: number;
|
|
1213
|
+
}[];
|
|
1214
|
+
}[];
|
|
1215
|
+
samples: {
|
|
1216
|
+
t_ms: number;
|
|
1217
|
+
heap_mb: number;
|
|
1218
|
+
}[];
|
|
1219
|
+
} | null;
|
|
1220
|
+
contention: {
|
|
1221
|
+
overlap_ms: number;
|
|
1222
|
+
cpu_max_ms: number;
|
|
1223
|
+
busy_share: number;
|
|
1224
|
+
inflight_at_start: number[];
|
|
1225
|
+
per_window: {
|
|
1226
|
+
n: number;
|
|
1227
|
+
overlap_ms: number;
|
|
1228
|
+
cpu_max_ms: number;
|
|
1229
|
+
}[];
|
|
1230
|
+
requests: ContendingRequest[];
|
|
1231
|
+
note: string;
|
|
1232
|
+
} | null;
|
|
1233
|
+
lineage: {
|
|
1234
|
+
keys: {
|
|
1235
|
+
key: string;
|
|
1236
|
+
from: string | null;
|
|
1237
|
+
shipped_bytes: number;
|
|
1238
|
+
load_wait_ms: number | null;
|
|
1239
|
+
verdict: KeyVerdict;
|
|
1240
|
+
readers: {
|
|
1241
|
+
name: string;
|
|
1242
|
+
island: boolean;
|
|
1243
|
+
}[];
|
|
1244
|
+
}[];
|
|
1245
|
+
components: LineageComponent[];
|
|
1246
|
+
unread: string[];
|
|
1247
|
+
server_only: string[];
|
|
1248
|
+
notes: string[];
|
|
1249
|
+
} | null;
|
|
1250
|
+
ledger: LedgerLine[] | null;
|
|
1251
|
+
patterns: {
|
|
1252
|
+
save_per_render_ms: number;
|
|
1253
|
+
cost_per_render_ms: number;
|
|
1254
|
+
kind: PatternKind;
|
|
1255
|
+
title: string;
|
|
1256
|
+
fix: string;
|
|
1257
|
+
example?: {
|
|
1258
|
+
before: string;
|
|
1259
|
+
after: string;
|
|
1260
|
+
};
|
|
1261
|
+
sites: PatternSite[];
|
|
1262
|
+
cost_ms: number;
|
|
1263
|
+
alloc_bytes: number;
|
|
1264
|
+
save_ms: number;
|
|
1265
|
+
evidence: string;
|
|
1266
|
+
wait?: boolean;
|
|
1267
|
+
kept_bytes?: number;
|
|
1268
|
+
requests_left?: number;
|
|
1269
|
+
growth?: "grows" | "levels-off";
|
|
1270
|
+
seed_bytes?: number;
|
|
1271
|
+
chains?: {
|
|
1272
|
+
start: number;
|
|
1273
|
+
ms: number;
|
|
1274
|
+
}[][];
|
|
1275
|
+
naive_save_ms?: number;
|
|
1276
|
+
}[] | null;
|
|
1277
|
+
growth: HeapGrowth | null;
|
|
1278
|
+
drill: DrillNode | null;
|
|
1279
|
+
forecast: Forecast | null;
|
|
1280
|
+
span_values: SpanValueRow[];
|
|
1281
|
+
waiting: {
|
|
1282
|
+
caller: string;
|
|
1283
|
+
kind: string;
|
|
1284
|
+
count: number;
|
|
1285
|
+
wait_ms: number;
|
|
1286
|
+
}[];
|
|
1287
|
+
user_timings: {
|
|
1288
|
+
name: string;
|
|
1289
|
+
count: number;
|
|
1290
|
+
total_ms: number;
|
|
1291
|
+
avg_ms: number;
|
|
1292
|
+
max_ms: number;
|
|
1293
|
+
}[];
|
|
1294
|
+
requests: {
|
|
1295
|
+
method: string;
|
|
1296
|
+
path: string;
|
|
1297
|
+
route: string | null;
|
|
1298
|
+
status: number;
|
|
1299
|
+
ms: number;
|
|
1300
|
+
cpu_ms: number;
|
|
1301
|
+
wait_ms: number;
|
|
1302
|
+
net_ms: number;
|
|
1303
|
+
net_count: number;
|
|
1304
|
+
inflight: number;
|
|
1305
|
+
internal: boolean;
|
|
1306
|
+
tags: Record<string, string> | null;
|
|
1307
|
+
span_count: number | null;
|
|
1308
|
+
span_ms: number | null;
|
|
1309
|
+
hole: HoleRequestStats | null;
|
|
1310
|
+
}[];
|
|
1311
|
+
links: {
|
|
1312
|
+
html: string;
|
|
1313
|
+
json: string;
|
|
1314
|
+
cpuprofile: string;
|
|
1315
|
+
};
|
|
1316
|
+
other_requests_ms?: number | undefined;
|
|
1317
|
+
schema: string;
|
|
1318
|
+
version: number;
|
|
1319
|
+
engine: {
|
|
1320
|
+
version: number;
|
|
1321
|
+
};
|
|
1322
|
+
units: {
|
|
1323
|
+
time: string;
|
|
1324
|
+
size: string;
|
|
1325
|
+
memory_suffix_mb: boolean;
|
|
1326
|
+
};
|
|
1327
|
+
id: string;
|
|
1328
|
+
created: number;
|
|
1329
|
+
kind: "window" | "page" | "request" | "trap";
|
|
1330
|
+
node: string;
|
|
1331
|
+
dev: boolean;
|
|
1332
|
+
sourcemapped: boolean;
|
|
1333
|
+
};
|
|
1334
|
+
/** The page's assets in the JSON report (`twice` is absent when nothing shipped twice). */
|
|
1335
|
+
type ReportJsonAssets = {
|
|
1336
|
+
twice?: {
|
|
1337
|
+
name: string;
|
|
1338
|
+
copies: {
|
|
1339
|
+
file: string;
|
|
1340
|
+
bytes: number;
|
|
1341
|
+
from?: string;
|
|
1342
|
+
}[];
|
|
1343
|
+
extra: number;
|
|
1344
|
+
}[];
|
|
1345
|
+
missed_why?: {
|
|
1346
|
+
url: string;
|
|
1347
|
+
why: string;
|
|
1348
|
+
}[] | undefined;
|
|
1349
|
+
missed?: string[] | undefined;
|
|
1350
|
+
totals: {
|
|
1351
|
+
js: number;
|
|
1352
|
+
js_wire: number;
|
|
1353
|
+
css: number;
|
|
1354
|
+
css_wire: number;
|
|
1355
|
+
font: number;
|
|
1356
|
+
image: number;
|
|
1357
|
+
wire: number;
|
|
1358
|
+
lazy_js: number;
|
|
1359
|
+
blocking: number;
|
|
1360
|
+
blocking_count: number;
|
|
1361
|
+
js_files: number;
|
|
1362
|
+
};
|
|
1363
|
+
html: {
|
|
1364
|
+
bytes: number;
|
|
1365
|
+
wire: number;
|
|
1366
|
+
};
|
|
1367
|
+
inline: {
|
|
1368
|
+
script: number;
|
|
1369
|
+
style: number;
|
|
1370
|
+
};
|
|
1371
|
+
files: {
|
|
1372
|
+
contains?: string[] | undefined;
|
|
1373
|
+
lazy?: boolean | undefined;
|
|
1374
|
+
blocking?: boolean | undefined;
|
|
1375
|
+
url: string;
|
|
1376
|
+
kind: import("@ogygia/core/insights").AssetKind;
|
|
1377
|
+
via: "script" | "img" | "modulepreload" | "stylesheet" | "island" | "preload" | "inline-import" | "static-import" | "route-node" | "runtime-phase";
|
|
1378
|
+
bytes: number;
|
|
1379
|
+
wire: number;
|
|
1380
|
+
}[];
|
|
1381
|
+
missing?: undefined;
|
|
1382
|
+
};
|
|
1383
|
+
export declare function report_json(a: Analysis, meta: ReportMeta, base: string, extras: ReportExtras): ReportJson;
|
|
1384
|
+
/**
|
|
1385
|
+
* A complete, portable dump: everything the report needs to reconstruct the
|
|
1386
|
+
* full interactive report later, on any machine. This is the artifact a user
|
|
1387
|
+
* downloads from a serverless host (where reports can't be stored) and uploads
|
|
1388
|
+
* to the viewer. Rendering needs no inspector, so it works everywhere.
|
|
1389
|
+
*/
|
|
1390
|
+
export interface ReportDump {
|
|
1391
|
+
kind: "ogygia-profiler-dump";
|
|
1392
|
+
version: 1;
|
|
1393
|
+
meta: ReportMeta;
|
|
1394
|
+
analysis: Analysis;
|
|
1395
|
+
extras: ReportExtras;
|
|
1396
|
+
}
|
|
1397
|
+
export declare function report_dump(a: Analysis, meta: ReportMeta, extras: ReportExtras): ReportDump;
|
|
1398
|
+
/** Narrowing guard for an uploaded dump before we render it. */
|
|
1399
|
+
export declare function is_dump(x: unknown): x is {
|
|
1400
|
+
meta: ReportMeta;
|
|
1401
|
+
analysis: Analysis;
|
|
1402
|
+
extras: ReportExtras;
|
|
1403
|
+
};
|
|
1404
|
+
export { type HoleRequestStats, type IslandHazard, type IslandStat, type OgygiaRequestStats, type SpanRecord, browser_of, hazard_fix, hazard_words, inline_threshold_tune, own_requests };
|