Skip to content

API

@ogygia/insights

Findings computed from the event layer.

On this page

This page is generated from the package’s own .d.ts files on every build, so the signatures, descriptions and examples below always match the source.

Exports analyze_cpu · analyze_page · analyze_session · apply_attr_rules · assets_diff · barrel_left_fix · barrel_left_words · browser_of · compare · defer_keys · dev_compile_ms · devtools_switched_on · dynamic_imports · engine_of · explain_held_open · first_difference · hazard_fix · hazard_words · hole_segments · html_diff · hydration_hazards · inline_threshold_tune · is_trace · late_found · lcp_font · lcp_rivals · prebundled_names · rate · runtime_scripts · session_timeline · static_imports · switch_in_url · testing_lean · vital_parts · vitals_moved · weigh_assets · without_switch · write_switch · DEVTOOLS_COOKIE · DEVTOOLS_ON · DEVTOOLS_PARAM · DOM_LARGE · HOLE_SEG_LABEL · TESTING_COOKIE · TESTING_ENGINE_VERSION · TESTING_LEAN · TESTING_PARAM · AssetRef · AssetsDiff · AttrRule · ChunkBarrel · CpuFn · CpuSummary · Failure · FpDrift · HeldOpen · HoleBatch · HoleFailure · HoleWait · HtmlDiff · InteractionCpuInput · IslandBarrel · IslandCode · IslandRow · KeptIsland · NavPhases · PageAssets · PageFinding · PageInput · PageInteraction · PageNav · PageReport · RatedVital · RegionFact · RestoreEvent · RuntimeScripts · ServerProfileBrief · SessionClick · SessionData · SessionFinding · SessionFrame · SessionInteraction · SessionNav · SessionReport · SessionRequest · SessionShift · TimelineItem · TimelineLane · VitalMove · VitalPart · Weight · AssetKind · BarrelLeftReason · CodeKind · HookEntry · HydrationStatus · IslandHazard · PartedVital · Ref

import { … } from '@ogygia/insights';

analyze_cpu

function

function analyze_cpu(trace: SelfProfileTrace, windows: IslandWindow[], longtasks: {
  t: number;
  ms: number;
}[], page_url: string): CpuSummary;

analyze_page

function

function analyze_page(page: PageInput, regions: RegionFact[], failures?: Failure[], now?: number, cpu?: CpuSummary | null): PageReport;

analyze_session

function

function analyze_session(s: SessionData, names: (fp: string) => string, page_url: string): SessionReport;

apply_attr_rules

function

Split changes into those rules ignore and those left.

function apply_attr_rules(changes: AttrChange[], rules: AttrRule[]): {
  left: AttrChange[];
  ignored: AttrChange[];
};

assets_diff

function

function assets_diff(a: WeighedLike, b: WeighedLike): AssetsDiff;

barrel_left_fix

function

The fix for a barrel an island imports whole: by its reasons, or (none known) add the pass.

function barrel_left_fix(why: readonly BarrelLeftReason[] | undefined): string;

barrel_left_words

function

barrels() left it: …, or '' when the pass said nothing about this barrel.

function barrel_left_words(why: readonly BarrelLeftReason[] | undefined): string;

browser_of

function

The browser a page ran in, by name and major version (Safari 18, Chrome 141, Firefox 133, Edge 141), from its user-agent string by plain search; null when it says nothing known. Some findings are one engine's (Safari reports no layout shifts; a preload one engine reuses another fetches again): the profiler's report and the Page tab name which.

function browser_of(ua: string | undefined): string | null;

compare

function

Islands matched by entry and their place among its copies; a moved fingerprint, explained.

function compare(was: Kept[], now: Kept[]): FpDrift[];

defer_keys

function

The page seed's defer ids → the page.data key each stands for (top level and one level down): the seed (application/ogygia-page, the flat devalue form) holds a defer marker [name, i] per streamed promise, the marker's payload the id the streamed resolve script settles. From the whole document's HTML or the seed script's own text.

function defer_keys(html: string, marker?: string): Map<number, string>;

dev_compile_ms

function

On the dev server: how much of an island's code load was the server COMPILING files on this request — the time (overlaps counted once) the server took to answer each file fetched in its load window, when that took 80 ms or more (a transform: a warm dev server answers in a few). 0 off the dev server, or when the visit does not list the files.

function dev_compile_ms(page: Pick<PageInput, "dev" | "visit">, r: Pick<IslandRow, "t0" | "load_ms">): number;

devtools_switched_on

function

Is it on in this browser (false off the browser, or with cookies blocked).

function devtools_switched_on(): boolean;

dynamic_imports

function

import("x") / import('x') specifiers in a script's text (Kit's inline start).

function dynamic_imports(text: string): string[];

engine_of

function

The engine family a user agent runs on: what makes two browsers measure a page differently (Edge and Chrome are one; Safari reports no layout shifts and refetches a preload Chromium reuses).

function engine_of(ua: string | undefined): "chromium" | "webkit" | "gecko" | null;

explain_held_open

function

THE DOCUMENT HELD OPEN: the page painted early, but its HTML kept coming — and islands wake only once the whole document is in (DOMContentLoaded, the wake gate), so every island waited for its end, even one that reads nothing late. Usually a load's streamed promise: the response stays open until the last one settles. From the browser (the navigation's first and last byte, the paint, the islands' hydrate steps after the end) and, when known, what held it (held_open: each streamed promise by its page.data key and when it settled). With no visit, the profiled render alone says it (its chunks: the early part, then the tail after the longest pause).

function explain_held_open(page: PageInput, rows: readonly IslandRow[], name_of: (fp: string) => string): PageFinding | null;

first_difference

function

Where two strings first differ, as a short "server … / now …" pair (the markup-changed proof).

function first_difference(a: string, b: string, span?: number): {
  at: number;
  server: string;
  now: string;
} | null;

hazard_fix

function

The fix for those lines: what to do with each kind.

function hazard_fix(lines: readonly IslandHazard[]): string;

hazard_words

function

"In its own code, the likeliest: X.svelte:4 (…) awaits …; Y.svelte:8 reads Date.now( while rendering …" — said the same by the profiler's report and the devtools' Page tab

function hazard_words(lines: readonly IslandHazard[]): string;

hole_segments

function

The segments, in order. Without a timing, one: the wait. A request the document preloaded starts before the fallback counts: its segments start where it left.

function hole_segments(h: HoleTimes): {
  k: HoleSegKind;
  a: number;
  b: number;
}[];

html_diff

function

function html_diff(server: string, browser: string, context?: number, max_d?: number): HtmlDiff;

hydration_hazards

function

function hydration_hazards(source: string): Hazard[];

inline_threshold_tune

function

THE INLINE THRESHOLD THAT TAKES THE SMALL SHEETS OFF THE PAINT: Kit inlines its route stylesheets under inlineStyleThreshold (ogygia's island sheets follow the same setting), as <style> in the HTML — no request to wait on. Of the blocking build stylesheets (/_app/immutable/), the smallest first, while each is 8 KB or less and the HTML grows by 24 KB at most: the threshold that inlines them (just over the largest, in whole KB), how many, how many bytes. Null under two sheets. The profiler's page weight (style) and the Page tab's resources (css) both ask it.

function inline_threshold_tune(blocking: readonly {
  url: string;
  kind: string;
  bytes: number;
}[]): {
  threshold: number;
  files: number;
  bytes: number;
} | null;

is_trace

function

Is this a trace the analyzer can read.

function is_trace(x: unknown): x is SelfProfileTrace;

late_found

function

WHY THE BROWSER FOUND THE LARGEST PAINT'S FILE LATE, from what the visit saw: a CSS background (found only once its stylesheet is in and the element laid out), an image its island's code added as it woke (the request began after it hydrated: the server HTML had none), or an <img> in the HTML at the low priority an image starts at. The generic advice when none of them is it.

function late_found(p: NonNullable<NonNullable<PageInput["visit"]>["paints"]> | undefined, res: {
  start: number;
  req_start?: number;
} | undefined, islands: readonly PageIsland[], name_of: (fp: string | undefined) => string): string;

lcp_font

function

THE FONT THE LARGEST PAINT WAITED FOR: a text paint (no file of its own) that came within 200 ms of a font file landing after the first paint, whose face hides its text until then (font-display auto/block). The page's text was there all along, invisible: the font, not the server, set the LCP. Shared by the Page tab's split and the profiler's LCP gap.

function lcp_font(visit: PageInput["visit"] | null | undefined): {
  family: string;
  file: string;
  end: number;
} | null;

lcp_rivals

function

WHAT THE LARGEST PAINT'S DOWNLOAD SHARED THE NETWORK WITH: images far below the first screen, not lazy, whose own download overlapped the largest paint's file (or, a text paint, the wait from the first byte to the paint). Shared by the Page tab's split and the profiler's LCP gap.

function lcp_rivals(visit: PageInput["visit"] | null | undefined): {
  bytes: number;
  files: string[];
} | null;

prebundled_names

function

The packages a dev server's _metadata.json optimized keys name: svelte/internal/client → svelte, @scope/lib/x → @scope/lib, `ogygia >

function prebundled_names(keys: readonly string[]): string[];

rate

function

function rate(key: RatedVital["key"], value: number): Rating;

runtime_scripts

function

SCRIPTS LOADED AT RUNTIME — what the browser fetched that neither the HTML nor any module's imports name: a script that loads more scripts (a CDN component library fetching its parts, a tag manager, a runtime's on-demand chunk). The server cannot see them coming; the profiler user's own visit saw them. until: the end of "at start" on the visit's clock (a lazy island woken by a scroll later does not count). Null when there are none.

function runtime_scripts(assets: readonly {
  url: string;
}[], resources: readonly {
  url: string;
  type: string;
  start: number;
  size?: number;
  transfer?: number;
}[], origin: string, until: number): RuntimeScripts | null;

session_timeline

function

The session on one clock, lane by lane (the Record tab draws it). Capped per lane.

function session_timeline(s: SessionData, names: (fp: string) => string): TimelineLane[];

static_imports

function

The STATIC imports of a bundled module (import{a}from"./x.js", import"./y.js", export*from"./z.js"): specifiers after from / a bare import that look like module paths (relative or absolute, ending in .js/.mjs). Bundler output writes them plainly; a string that merely contains such text inflates nothing that does not exist — every hit is fetched, and a miss is dropped.

function static_imports(code: string): string[];

switch_in_url

function

What the URL asks for: true on, false off, null nothing (absent or another value).

function switch_in_url(url: URL): boolean | null;

testing_lean

function

Lean testing in this browser: the cookie, or the URL param (false off the browser).

function testing_lean(): boolean;

vital_parts

function

function vital_parts(page: PageInput, key: PartedVital): VitalPart[] | null;

vitals_moved

function

WHICH VITALS MOVED between two visits of a page, past the noise, and for a split vital the part that moved most. ONE rule for both tools: the profiler's "since your last profile" and the Page tab's "since your last load" read the same moves. parts(side, key) gives a side's parts.

function vitals_moved(a: Record<string, number | undefined>, b: Record<string, number | undefined>, parts: (side: "a" | "b", key: PartedVital) => VitalPart[] | null): VitalMove[];

weigh_assets

function

function weigh_assets(opts: WeighOptions): Promise<PageAssets>;

without_switch

function

The URL without the switch param (the address after it was applied).

function without_switch(url: URL): URL;

write_switch

function

Turn it on / off in this browser (the cookie; the caller updates what shows).

function write_switch(on: boolean): void;

const

THE DEVTOOLS SWITCH — whether devtools is on in this browser, in a BUILD with devtools (a QA or preview deploy; the dev server always has it on). One cookie decides all of it: the launcher shows, the page is measured from the start (runtime/beacon.ts), what islands leave running is watched (leftovers.ts), and the server writes its event side-channel (hooks.ts). Off — the default — a visitor sees nothing and pays nothing.

A developer turns it on for their own browser, and it stays on across navigations and reloads:

  • ?og-devtools=on / ?og-devtools=off on any page (the server sets the cookie on that very response, the browser too — a prerendered page has no server — and the address drops the param);
  • ogygia.devtools.on() / .off() in the console;
  • "hide" in the dock turns it off.

(The value is not the 1 an earlier launcher set on a plain click: a browser that clicked the old button once stays off until it opts in.)

A plain module: the server, the runtime and the launcher all read it.

DEVTOOLS_ON

const

const DEVTOOLS_ON = "on"

DEVTOOLS_PARAM

const

The URL param that flips it: ?og-devtools=on / ?og-devtools=off.

const DEVTOOLS_PARAM = "og-devtools"

DOM_LARGE

const

a page of this many elements or more is named (the beacon reports from the same count)

const DOM_LARGE = 1500

HOLE_SEG_LABEL

const

const HOLE_SEG_LABEL: Record<HoleSegKind, string>

const

LEAN TESTING: og_testing=lean (or ?og-testing=lean) beside the devtools switch — the testing API (window.__ogygia_testing) works in full, and nothing else of devtools runs: no launcher, no dock, no watcher of the page's timers, no server event side-channel in the HTML. The page loads what it loads with devtools off, plus the testing engine when a test first asks. An engine that does not know the cookie ignores it.

TESTING_ENGINE_VERSION

const

The report shape the page's testing engine answers (window.__ogygia_testing.version). The engine ships with the SITE's build and @ogygia/testing with the TEST's package, so the two can differ: the test side reads this from the page, fills in what it can for an older engine, and warns once.

Each version, and what it DETECTS differently (results across two versions compare only where nothing below changed):

1 — 0.8.2. 2 — hydration key, session navigations (with what started each), finding names, counts.cls, engine on every report, hydration t0 / done. Detection: a router navigation that never swapped the page no longer starts a new page for page(). Hydration status: unchanged from 1 (an island that reads clean on one and changed on the other differed in that run — input landing while it hydrated is the usual cause; 3 flags it as input). 3 — hydration change (attributes / markup), attributes, input, ignoreAttributes; page ogygia (what measuring cost). Detection: unchanged — changed means what it meant in 2; the new fields only say what kind of change it was.

const TESTING_ENGINE_VERSION = 3

TESTING_LEAN

const

const TESTING_LEAN = "lean"

TESTING_PARAM

const

const TESTING_PARAM = "og-testing"

AssetRef

interface

AssetRef.url

AssetRef.kind

AssetRef.blocking

the browser must have it before the first paint (a head stylesheet, a classic sync script)

AssetRef.via

how the document asks for it (island: the runtime loads it to wake an island)

AssetRef.lazy

loads later, on demand (an island that wakes when visible / on interaction), not at start

AssetRef.runtime

the ogygia runtime's own script (data-ogygia-runtime): the parts it loads itself are its own

AssetRef.phase

a part of the ogygia runtime it loads on demand as islands wake (and what that part imports)

interface AssetRef {/*…*/}
url: string;
kind: AssetKind;
blocking: boolean;
via: "script" | "modulepreload" | "preload" | "stylesheet" | "inline-import" | "img" | "static-import" | "island" | "route-node" | "runtime-phase";
lazy?: boolean;
runtime?: true;
phase?: true;

AssetsDiff

interface

AssetsDiff.js

JS at start, decoded, then → now

AssetsDiff.lazy_js

AssetsDiff.added

AssetsDiff.removed

AssetsDiff.grew

AssetsDiff.shrank

AssetsDiff.to_start

the same file, now loaded at start (it loaded later before: an island's wake changed)

AssetsDiff.to_later

the same file, now loaded later (it loaded at start before)

interface AssetsDiff {/*…*/}
js: {
    a: number;
    b: number;
  };
lazy_js: {
    a: number;
    b: number;
  };
added: AssetChange[];
removed: AssetChange[];
grew: AssetChange[];
shrank: AssetChange[];
to_start: AssetChange[];
to_later: AssetChange[];

AttrRule

interface

AttrRule.tag

AttrRule.name

AttrRule.value

interface AttrRule {/*…*/}
tag?: Pat;
name: Pat;
value?: Pat;

ChunkBarrel

interface

A re-export barrel a chunk still holds: its name, the modules it brings, and why the barrel pass left it (when it said).

ChunkBarrel.name

ChunkBarrel.fanout

ChunkBarrel.why

interface ChunkBarrel {/*…*/}
name: string;
fanout: number;
why?: BarrelLeftReason[];

CpuFn

interface

CpuFn.name

CpuFn.file

CpuFn.line

CpuFn.kind

CpuFn.self_ms

CpuFn.total_ms

interface CpuFn {/*…*/}
name: string;
file: string;
line: number | null;
kind: CodeKind;
self_ms: number;
total_ms: number;

CpuSummary

interface

CpuSummary.window_ms

sampled span (first to last sample)

CpuSummary.busy_ms

CpuSummary.by_kind

CpuSummary.fns

CpuSummary.files

CpuSummary.islands

per island fingerprint: CPU inside its hydrate window and the functions that took it

CpuSummary.outside

long tasks outside every island's hydrate window

CpuSummary.interval_ms

the sampling interval seen (ms)

CpuSummary.by_host

main-thread ms per other origin (the nearest frame with a script URL decides)

interface CpuSummary {/*…*/}
window_ms: number;
busy_ms: number;
by_kind: {
    kind: CodeKind;
    ms: number;
  }[];
fns: CpuFn[];
files: {
    file: string;
    kind: CodeKind;
    ms: number;
  }[];
islands: Record<string, {
    ms: number;
    top: CpuFn[];
  }>;
outside: {
    ms: number;
    top: CpuFn[];
  };
interval_ms: number;
by_host?: Record<string, number>;

Failure

interface

Failure.fp

Failure.message

Failure.span

its wake → the failure (page clock): the island was loading, and held its turn, meanwhile

Failure.turn

when its hydrate step began (page clock): from here to the failure it held the thread, as a hydrating island does

interface Failure {/*…*/}
fp?: string;
message: string;
span?: [number, number];
turn?: number;

FpDrift

interface

FpDrift.entry

FpDrift.fp_was

FpDrift.fp_now

FpDrift.path

the first differing path in the props (stamp, items[2].id), when the props parse

FpDrift.was

the values there, clipped (or the text around the first difference)

FpDrift.now

interface FpDrift {/*…*/}
entry: string;
fp_was: string;
fp_now: string;
path?: string;
was?: string;
now?: string;

HeldOpen

interface

HeldOpen.side

HeldOpen.keys

HeldOpen.early_ms

server side: the early part's last byte left at early_ms, the tail's (late_bytes) at late_ms

HeldOpen.early_bytes

HeldOpen.late_ms

HeldOpen.late_bytes

HeldOpen.islands

server side: the islands the page renders (the finding needs some to be about)

interface HeldOpen {/*…*/}
side: "server" | "browser";
keys: {
    key: string | null;
    at: number;
  }[];
early_ms?: number;
early_bytes?: number;
late_ms?: number;
late_bytes?: number;
islands?: number;

HoleBatch

interface

A batch request (runtime/frame-nav.ts) that carried fewer holes than it was sent for: the rest fetched on their own right after it.

HoleBatch.sent

HoleBatch.delivered

HoleBatch.status

the response's status (0: the request failed)

HoleBatch.refused

HoleBatch.final_url

HoleBatch.names

the holes it was for (names)

interface HoleBatch {/*…*/}
sent: number;
delivered: number;
status: number;
refused?: "redirected" | "document";
final_url?: string;
names: string[];

HoleFailure

interface

HoleFailure.fp

HoleFailure.name

HoleFailure.endpoint

HoleFailure.reason

HoleFailure.final_url

HoleFailure.message

HoleFailure.attempts

interface HoleFailure {/*…*/}
fp?: string;
name: string;
endpoint?: string;
reason: RegionRefusal | "error";
final_url?: string;
message?: string;
attempts: number;

HoleWait

interface

HoleWait.name

HoleWait.wait_ms

ms from the hole's fetch start to its answer's swap

HoleWait.below_fold

below the first screen (its fallback is not what the visitor looks at first)

HoleWait.server_ms

its server render, per request, when known (the profiler recorded the hole's requests, or the answer's Server-Timing said)

HoleWait.server_queue_ms

its wait on the server for a render slot, before the render (Server-Timing / the profiler)

HoleWait.endpoint

the hole's endpoint (the devtools find its element by it: a hole has no fingerprint)

HoleWait.shown_at

page times: when the fallback began to count (the paint, or the hole's own start), and its request as the browser timed it — left, first byte back, last byte. They split the wait.

HoleWait.left_at

HoleWait.first_at

HoleWait.end_at

HoleWait.batch_size

it came in ONE batch request with the holes that started with it: how many (its own part landed when the server rendered it — first_at is that, out of order). No browser gate held it.

interface HoleWait {/*…*/}
name: string;
wait_ms: number;
below_fold: boolean;
server_ms?: number;
server_queue_ms?: number;
endpoint?: string;
shown_at?: number;
left_at?: number;
first_at?: number;
end_at?: number;
batch_size?: number;

HtmlDiff

interface

HtmlDiff.hunks

HtmlDiff.removed

tokens removed / added

HtmlDiff.added

HtmlDiff.partial

the diff gave up (too many changes) and shows only where they start

interface HtmlDiff {/*…*/}
hunks: DiffHunk[];
removed: number;
added: number;
partial: boolean;

InteractionCpuInput

interface

InteractionCpuInput.t

InteractionCpuInput.mapped

the frames' lines are the source's (mapped through a source map): else a line is the served code's, and only the function and its file are quoted

InteractionCpuInput.wait

InteractionCpuInput.handler

interface InteractionCpuInput {/*…*/}
t: number;
mapped?: boolean;
wait: {
    ms: number;
    top: CpuFn[];
  } | null;
handler: {
    ms: number;
    top: CpuFn[];
  } | null;

IslandBarrel

interface

A barrel an island still imports whole, on the dev server: its file, the app modules behind it, and why the barrel pass left it (when it said).

IslandBarrel.file

IslandBarrel.fanout

IslandBarrel.why

interface IslandBarrel {/*…*/}
file: string;
fanout: number;
why?: BarrelLeftReason[];

IslandCode

interface

IslandCode.fp

IslandCode.name

IslandCode.bytes

the island's app code, served size in dev

IslandCode.top

its heaviest modules

IslandCode.barrels

re-export barrels still imported whole, with the app modules each drags in

IslandCode.hazards

its components' lines that draw differently in the browser (the dev server read their sources)

interface IslandCode {/*…*/}
fp?: string;
name: string;
bytes: number;
top: {
    file: string;
    bytes: number;
  }[];
barrels: IslandBarrel[];
hazards?: IslandHazard[];

IslandRow

interface

IslandRow.fp

IslandRow.name

IslandRow.wake

IslandRow.load_ms

wake began → module + hydrate core loaded

IslandRow.queue_ms

loaded → its scheduler turn (the queue behind other islands, and the DCL/paint gate)

IslandRow.hydrate_ms

the synchronous hydrate step

IslandRow.t0

IslandRow.done

IslandRow.recovered

IslandRow.changed

IslandRow.shift

layout shift (summed) this island caused within a moment of hydrating

IslandRow.longtask_ms

long-task ms that overlapped its hydration window

IslandRow.early_ms

the first interaction reached it before it was awake (ms early), when it did

IslandRow.below_fold

IslandRow.cpu_ms

main-thread CPU sampled inside its hydrate window (null: no trace)

interface IslandRow {/*…*/}
fp: string;
name: string;
wake: string;
load_ms: number;
queue_ms: number | null;
hydrate_ms: number;
t0: number;
done: number;
recovered: boolean;
changed: boolean;
shift: number;
longtask_ms: number;
early_ms: number | null;
below_fold: boolean;
cpu_ms: number | null;

KeptIsland

interface

One island as one load (or render) had it.

KeptIsland.entry

KeptIsland.fp

KeptIsland.props

interface KeptIsland {/*…*/}
entry: string;
fp: string;
props?: string;

interface

The document's steps before its first byte (ms).

the request until the server's first byte

PageAssets

interface

PageAssets.assets

PageAssets.unscoped

components whose styles shipped WITHOUT their scope (the build's fallback marker, in a stylesheet or an inline <style>): their rules apply to the whole page

PageAssets.missed

references that could not be weighed (a 404, a timeout, the budget ran out)

PageAssets.missed_why

each of those, and why: budget (time ran out before it), timeout, status 404, file cap, error: … — a total with only status misses can be trusted; budget / timeout ones vary

PageAssets.html

the HTML itself

PageAssets.inline

inline <script> / <style> text in the document, decoded bytes

PageAssets.totals

interface PageAssets {/*…*/}
assets: WeighedAsset[];
unscoped?: (UnscopedStyles & {
    in: string;
  })[];
missed: string[];
missed_why?: {
    url: string;
    why: string;
  }[];
html: {
    bytes: number;
    wire: number;
  };
inline: {
    script: number;
    style: number;
  };
totals: {
    js: number;
    js_wire: number;
    css: number;
    css_wire: number;
    font: number;
    image: number;
    wire: number;
    lazy_js: number;
    blocking: number;
    blocking_count: number;
    js_files: number;
  };

PageFinding

interface

PageFinding.code

PageFinding.severity

PageFinding.message

PageFinding.fix

PageFinding.fps

the islands it is about (to light up on the page)

PageFinding.dev_compile

it is the dev server's own doing: its first compile of the page (a slow first byte while the page compiled on its first request), or the CSS it adds with JavaScript moving the page (a shift). A reload reads it differently: "since your last load" never calls it new or fixed

interface PageFinding {/*…*/}
code: string;
severity: Severity;
message: string;
fix?: string;
fps: string[];
dev_compile?: true;

PageInput

interface

PageInput.dev

measured on the dev server (it compiles a page on its first request: a slow first byte there is not the app's)

PageInput.server_profiles

DEVTOOLS ONLY (the profiler's report is itself a profile): the profiler's last run of this page, and of the pages it navigated to by path. Present (even empty) means: say what the server did, or how to find out

PageInput.server_profile

PageInput.interaction_cpu

the slowest interaction's CPU, when a trace of it was taken

PageInput.held_open

what held the document open: its streamed promises by page.data key — when each settled (side 'server': left the server, ms into the render, from the profiled render's chunks; 'browser': arrived, ms from the navigation, stamped by the resolve global)

PageInput.vitals

PageInput.visit

PageInput.islands

PageInput.firsts

PageInput.shifts

PageInput.longtasks

PageInput.longtasks_from

frames: the browser has no long-task timing — these are frames drawn more than 50 ms late

PageInput.shifts_from

boxes: the browser has no layout-shift timing — the shifts are islands whose box changed as they woke, scored the way a layout shift is (an estimate)

PageInput.snapshots

(from: a big island's window — where it starts in the markup without comments)

PageInput.empty_slots

awake islands showing a children slot with nothing in it (read off the DOM; devtools only)

PageInput.hole_failures

holes whose answer never came (the bus; devtools only)

PageInput.island_code

each island's app code in dev (the dev server's module graph; devtools only)

PageInput.hole_waits

how long each hole's fallback showed before its answer (the bus; devtools only)

PageInput.hole_batches

batch requests that did not carry all their holes (the bus; devtools only)

PageInput.restore_events

what the restorer of a server transform reported (runtime/restore.ts __og_restore_log)

PageInput.fp_drift

islands whose fingerprint moved between two loads of this page (fp-drift.ts)

PageInput.prebundled

the dev server's pre-bundled packages (its .vite/deps/_metadata.json), read when the page loaded one: a package also served raw from its folder runs as two copies

PageInput.browser

the browser the page ran in (browser_of its user agent: Safari 26, Chrome 141)

PageInput.dock_open_at

when the devtools' own dock began to show as the page loaded (open, remembered from the last page), page clock; absent when it was opened later or not at all

PageInput.leftovers

what islands that left the page left running (devtools/leftovers.ts; devtools only)

PageInput.scroll_blockers

wheel / touch listeners still attached that hold scrolling (not passive), by the island (or the file) that added each (devtools/leftovers.ts; devtools only)

PageInput.bfcache

what keeps the page out of the back/forward cache: who added a window unload listener, and the browser's own reasons when this load came from Back and was not restored (devtools only)

interface PageInput {/*…*/}
dev?: boolean;
server_profiles?: Record<string, ServerProfileBrief>;
server_profile?: ServerProfileBrief;
interaction_cpu?: InteractionCpuInput;
held_open?: HeldOpen;
vitals: {
    ttfb?: number;
    fcp?: number;
    lcp?: number;
    cls?: number;
    inp?: number;
  };
visit: {
    nav?: {
      dcl?: number;
      load?: number;
      res_start?: number;
      start_hidden?: true;
      res_end?: number;
      size?: number;
      raw?: true;
      dom_interactive?: number;
      phases?: NavPhases;
      server_timing?: {
        name: string;
        ms: number;
        desc?: string;
      }[];
    };
    scripts?: {
      url: string;
      ms: number;
      count: number;
    }[];
    warnings?: {
      code: string;
      message: string;
      file?: string;
      fp?: string;
      t?: number;
    }[];
    paints?: {
      fcp?: number;
      lcp?: number;
      lcp_fp?: string;
      lcp_tag?: string;
      lcp_url?: string;
      lcp_replaced?: true;
      lcp_lazy?: true;
      lcp_priority?: "high" | "low";
      held?: {
        outcome: "arrived" | "input" | "cap" | "none";
        resources: number;
        waited_ms: number;
      };
    };
    resources?: {
      url: string;
      type: string;
      start: number;
      end: number;
      req_start?: number;
      res_start?: number;
      transfer?: number;
      size?: number;
      blocking?: boolean;
      weighed?: true;
    }[];
    resource_totals?: {
      type: string;
      count: number;
      transfer: number;
      size: number;
    }[];
    viewport?: [number, number];
    origin?: string;
    named?: string[];
    in_page?: string[];
    preload_misses?: PreloadMiss[];
    preloads_unused?: {
      url: string;
      as: string;
      bytes: number;
    }[];
    uncompressed?: {
      url: string;
      type: string;
      bytes: number;
    }[];
    font_faces?: {
      family: string;
      display: string;
      urls: string[];
    }[];
    images_oversized?: {
      url: string;
      natural: [number, number];
      shown: [number, number];
      dpr: number;
      bytes: number;
      fp?: string;
    }[];
    scroll_jank?: {
      start: number;
      ms: number;
      scripts: {
        url: string;
        fn: string;
        invoker: string;
        ms: number;
        island?: string;
      }[];
    }[];
    forced_layout?: {
      start: number;
      end: number;
      ms: number;
      url: string;
      fn: string;
    }[];
    images_eager_below?: {
      url: string;
      top: number;
      bytes: number;
      fp?: string;
    }[];
    images_unsized?: string[];
    dom?: {
      nodes: number;
      depth: number;
      deepest: string;
      widest: {
        at: string;
        children: number;
      };
      islands: {
        fp: string;
        nodes: number;
      }[];
    };
    entry_fallbacks?: {
      entry: string;
      src: string;
      recovered: boolean;
      name?: string;
    }[];
    refetched?: {
      url: string;
      how: "revalidated" | "downloaded";
      bytes: number;
      ms: number;
      entry?: string;
      runtime?: boolean;
      name?: string;
    }[];
    interaction?: PageInteraction;
    navs?: PageNav[];
  } | null;
islands: PageIsland[];
firsts: {
    fp: string;
    t: number;
    type: string;
  }[];
shifts: {
    t: number;
    value: number;
    fp?: string;
    tag?: string;
  }[];
longtasks: {
    t: number;
    ms: number;
  }[];
longtasks_from?: "frames";
shifts_from?: "boxes";
snapshots?: {
    fp: string;
    ssr: string;
    hydrated: string;
    final?: string;
    from?: number;
  }[];
empty_slots?: string[];
hole_failures?: HoleFailure[];
island_code?: IslandCode[];
hole_waits?: HoleWait[];
hole_batches?: HoleBatch[];
restore_events?: RestoreEvent[];
fp_drift?: {
    name: string;
    fp?: string;
    path?: string;
    was?: string;
    now?: string;
  }[];
prebundled?: string[];
browser?: string;
dock_open_at?: number;
leftovers?: {
    name: string;
    intervals: number;
    listeners: string[];
    fires: number;
    last_ago?: number;
  }[];
scroll_blockers?: {
    owner: string;
    type: string;
    on: string;
    forced: boolean;
  }[];
bfcache?: {
    unload: string[];
    not_restored?: string[];
  };

PageInteraction

interface

PageInteraction.name

PageInteraction.t

PageInteraction.ms

PageInteraction.delay

input → its handlers began (the main thread was busy)

PageInteraction.processing

the handlers

PageInteraction.presentation

handlers done → the next frame painted

PageInteraction.target

PageInteraction.fp

PageInteraction.scripts

(forced: of a script's time, the browser laying the page out because it read sizes after a change)

interface PageInteraction {/*…*/}
name: string;
t: number;
ms: number;
delay: number;
processing: number;
presentation: number;
target: string;
fp?: string;
scripts?: {
    url: string;
    fn: string;
    invoker: string;
    ms: number;
    phase: "delay" | "handler" | "paint";
    island?: string;
    forced?: number;
  }[];

interface

One in-app navigation (the router's body swap), on the page's clock.

the new page's HTML arrived

its stylesheets were in

the swap committed: the new page shows

the fetch split, from the page request's timing: the wait for the first byte, the download

the request began before the click (a hover prefetch)

the page request on the server (the profiler's request log): its ms, the CPU it burned, its outbound calls — what the server did with the wait

PageReport

interface

PageReport.vitals

PageReport.rows

PageReport.findings

PageReport.blocking

blocking resources before first paint, slowest first

PageReport.bytes

PageReport.longtask_ms

PageReport.third_party

other origins on this page (null: none, or no origin to tell them by)

interface PageReport {/*…*/}
vitals: RatedVital[];
rows: IslandRow[];
findings: PageFinding[];
blocking: {
    url: string;
    ms: number;
    bytes: number;
  }[];
bytes: {
    type: string;
    count: number;
    transfer: number;
    size: number;
  }[];
longtask_ms: number;
third_party: ThirdParty | null;

RatedVital

interface

RatedVital.key

RatedVital.label

RatedVital.value

RatedVital.rating

interface RatedVital {/*…*/}
key: "ttfb" | "fcp" | "lcp" | "cls" | "inp";
label: string;
value: number;
rating: Rating;

RegionFact

interface

A region on the page, as the tab read it off the DOM. top is document-relative (px).

RegionFact.fp

RegionFact.name

RegionFact.kind

RegionFact.wake

RegionFact.hydrated

RegionFact.top

RegionFact.height

RegionFact.own_bytes

the wire bytes only this island loads (a build's island graph × the browser's sizes)

RegionFact.hidden

it draws nothing on this screen: no box of its own nor a child's (hidden by its CSS, or empty)

RegionFact.shows_at

the media query under which the page's CSS shows it (read off the sheets), when one does

RegionFact.headless

it never draws: no text, only hidden marker elements — an island there for its effects

interface RegionFact {/*…*/}
fp: string;
name: string;
kind: "island" | "lake" | "hole";
wake: string;
hydrated: boolean;
top?: number;
height?: number;
own_bytes?: number;
hidden?: true;
shows_at?: string;
headless?: true;

RestoreEvent

interface

A restored host that went wrong: upgraded by its component before the restore reached it (late), or restored to markup that does not match Svelte's (mismatch, the dev check).

RestoreEvent.kind

RestoreEvent.host

the host's tag

RestoreEvent.t

page time

RestoreEvent.diff

the first difference (mismatch)

RestoreEvent.island

the island holding it, when one does

interface RestoreEvent {/*…*/}
kind: "late" | "mismatch";
host: string;
t: number;
diff?: string;
island?: string;

RuntimeScripts

interface

RuntimeScripts.files

RuntimeScripts.bytes

decoded

RuntimeScripts.wire

on the wire (a third of decoded where the browser saw none: a cached file)

RuntimeScripts.by

by who serves them: this app, or a CDN package / host

RuntimeScripts.island_entries

of this app's, the island entry files (og-region.<id>.…js): islands no HTML named — the ones a hole's answer brought

interface RuntimeScripts {/*…*/}
files: number;
bytes: number;
wire: number;
by: {
    who: string;
    files: number;
    bytes: number;
  }[];
island_entries?: number;

ServerProfileBrief

interface

THE PROFILER'S LAST RUN OF A PAGE, in brief (devtools: the dock's profile store, shared with the Profiler tab) — what the server did when it rendered that page

ServerProfileBrief.ago_min

minutes since the run

ServerProfileBrief.render_ms

ServerProfileBrief.top

its top cost, in its own words (the report's first warning, else its heaviest component)

ServerProfileBrief.calls

ServerProfileBrief.calls_ms

ServerProfileBrief.no_store

the Cache-Control it saw the page answer, when that keeps the page out of the back/forward cache (no-store): the server's own answer, which the browser cannot read

ServerProfileBrief.prerendered

the page is prerendered: 'file' (the build's file answered, no render), 'route' (its route prerenders)

interface ServerProfileBrief {/*…*/}
ago_min: number;
render_ms: number;
top: string | null;
calls: number;
calls_ms: number;
no_store?: string;
prerendered?: "file" | "route";

SessionClick

interface

SessionClick.t

SessionClick.target

SessionClick.fp

SessionClick.el

SessionClick.clickable

it looked like it does something (a control, a link, a clickable role, a pointer cursor): a click on text or a blank stretch that changes nothing is no dead click

interface SessionClick {/*…*/}
t: number;
target: string;
fp: string | null;
el: WeakRef<Element> | null;
clickable?: true;

SessionData

interface

SessionData.from

SessionData.to

SessionData.interactions

SessionData.longtasks

SessionData.frames

SessionData.shifts

SessionData.requests

SessionData.mutations

SessionData.mut_log

when the DOM changed, and where (one stamp per island per batch of changes)

SessionData.clicks

every click, fast ones too

SessionData.errors

SessionData.navs

navigations as they started, with what started them (absent in a part saved before this field)

SessionData.heap

SessionData.hooks

the runtime hooks the page called while it recorded

SessionData.cpu

SessionData.cpu_off

SessionData.page

SessionData.pages

the documents the session crossed (a full page load mid-session), each with when it began

SessionData.names

island fingerprint → component name, taken on each page (its islands are gone after it)

interface SessionData {/*…*/}
from: number;
to: number;
interactions: SessionInteraction[];
longtasks: {
    t: number;
    ms: number;
  }[];
frames: SessionFrame[];
shifts: SessionShift[];
requests: SessionRequest[];
mutations: {
    fp: string | null;
    count: number;
    el: WeakRef<Element> | null;
  }[];
mut_log: {
    t: number;
    fp: string | null;
  }[];
clicks: SessionClick[];
errors: {
    t: number;
    message: string;
  }[];
navs?: SessionNav[];
heap: {
    from: number;
    to: number;
  } | null;
hooks: HookEntry[];
cpu: unknown;
cpu_off: string | null;
page: string;
pages: {
    url: string;
    t: number;
  }[];
names: Record<string, string>;

SessionFinding

interface

SessionFinding.code

SessionFinding.severity

SessionFinding.message

SessionFinding.fix

SessionFinding.refs

SessionFinding.url

a same-origin GET the tab can profile on the server in one click (server-time findings)

interface SessionFinding {/*…*/}
code: string;
severity: "error" | "warn" | "info";
message: string;
fix?: string;
refs: Ref[];
url?: string;

SessionFrame

interface

SessionFrame.t

SessionFrame.ms

SessionFrame.blocking

SessionFrame.scripts

interface SessionFrame {/*…*/}
t: number;
ms: number;
blocking: number;
scripts: {
    source: string;
    fn: string;
    invoker: string;
    ms: number;
  }[];

SessionInteraction

interface

SessionInteraction.t

SessionInteraction.name

SessionInteraction.duration

SessionInteraction.input_delay

SessionInteraction.processing

SessionInteraction.presentation

SessionInteraction.id

SessionInteraction.target

SessionInteraction.fp

SessionInteraction.el

interface SessionInteraction {/*…*/}
t: number;
name: string;
duration: number;
input_delay: number;
processing: number;
presentation: number;
id: number;
target: string;
fp: string | null;
el: WeakRef<Element> | null;

SessionNav

interface

A navigation as it started: where to, when, and the element that started it (the link or form, or the input being handled then) with its island.

SessionNav.url

SessionNav.t

SessionNav.type

SessionNav.source

SessionNav.fp

interface SessionNav {/*…*/}
url: string;
t: number;
type: string;
source: string | null;
fp: string | null;

SessionReport

interface

SessionReport.duration_ms

SessionReport.counts

shifts and cls: the layout moving with no input (the shifts the session's CLS counts)

SessionReport.findings

SessionReport.interactions

the slowest interactions, for the timeline

SessionReport.by_island

each island's part: clicks, slow interactions, the requests its clicks caused (server split)

SessionReport.requests

the slowest requests, with the server's own split when it sent one

SessionReport.failed

every request that answered an error status (type: the browser's initiator type)

SessionReport.by_element

the slowest interaction on each element the session touched, however quick (0: a click the browser did not time, under its 16 ms floor)

SessionReport.cpu

interface SessionReport {/*…*/}
duration_ms: number;
counts: {
    interactions: number;
    slow: number;
    longtasks: number;
    longtask_ms: number;
    requests: number;
    request_bytes: number;
    errors: number;
    shifts: number;
    cls: number;
    mutations: number;
    pages: number;
  };
findings: SessionFinding[];
interactions: {
    i: number;
    t: number;
    name: string;
    duration: number;
    target: string;
    fp: string | null;
  }[];
by_island: Record<string, IslandSession>;
requests: {
    url: string;
    ms: number;
    status: number | null;
    server_ms: number | null;
    cpu_ms: number | null;
    net_ms: number | null;
    up: string | null;
  }[];
failed: {
    url: string;
    status: number;
    type: string;
    t: number;
  }[];
by_element: {
    target: string;
    duration: number;
    processing: number;
    t: number;
    fp: string | null;
  }[];
cpu: CpuSummary | null;

SessionRequest

interface

SessionRequest.url

SessionRequest.type

SessionRequest.t

SessionRequest.ms

SessionRequest.bytes

SessionRequest.status

SessionRequest.server

the server's own account (Server-Timing: ogygia's profiler sends ssr / cpu / net / up1-3)

interface SessionRequest {/*…*/}
url: string;
type: string;
t: number;
ms: number;
bytes: number;
status: number | null;
server?: {
    name: string;
    ms: number;
    desc: string;
  }[];

SessionShift

interface

SessionShift.t

SessionShift.value

SessionShift.input

SessionShift.fp

SessionShift.el

interface SessionShift {/*…*/}
t: number;
value: number;
input: boolean;
fp: string | null;
el: WeakRef<Element> | null;

TimelineItem

interface

One item on the session's one-clock timeline (ms from the session start).

TimelineItem.t0

TimelineItem.t1

TimelineItem.label

TimelineItem.tone

TimelineItem.server

a request: the server's part and, inside it, the upstream wait (ms)

TimelineItem.ref

interface TimelineItem {/*…*/}
t0: number;
t1: number;
label: string;
tone: "ok" | "warn" | "bad" | "info";
server?: {
    ms: number;
    up: number;
  };
ref?: Ref;

TimelineLane

interface

TimelineLane.key

TimelineLane.label

TimelineLane.items

interface TimelineLane {/*…*/}
key: "input" | "main" | "net" | "islands" | "layout" | "errors";
label: string;
items: TimelineItem[];

VitalMove

interface

VitalMove.key

VitalMove.a

VitalMove.b

VitalMove.part

the part of a split vital that moved most (≥ 50 ms, else left out)

interface VitalMove {/*…*/}
key: "ttfb" | "fcp" | "lcp" | "cls" | "inp";
a: number;
b: number;
part?: {
    label: string;
    a: number;
    b: number;
  };

VitalPart

interface

VitalPart.key

VitalPart.label

VitalPart.ms

interface VitalPart {/*…*/}
key: string;
label: string;
ms: number;

Weight

interface

Weight.bytes

Weight.wire

Weight.imports

a module's static imports (resolved to absolute paths), for the walk

Weight.dynamic

its dynamic imports (resolved) — followed only where the page names them (Kit's route nodes)

Weight.unscoped

a stylesheet's unscoped fallbacks (see contract/unscoped-css.ts)

Weight.vary

a font's Vary header (Safari refetches a font preload that varies by Origin when its

interface Weight {/*…*/}
bytes: number;
wire: number;
imports?: string[];
dynamic?: string[];
unscoped?: UnscopedStyles[];
vary?: string;

AssetKind

type

type AssetKind = "script" | "style" | "font" | "image" | "other";

BarrelLeftReason

type

Why an import stayed on its barrel: the barrel runs code of its own, the app keeps it, it lies outside the project, it hides names behind a module that cannot be read, it defines the name itself, it has two homes for the name, the import carries a region's identity, the import takes it whole, or the importer could not be parsed.

type BarrelLeftReason = (typeof BARREL_LEFT_REASONS)[number];

CodeKind

type

type CodeKind = "app" | "ogygia" | "svelte" | "dependency" | "page script" | "browser" | "devtools";

HookEntry

type

One runtime hook call as the readers keep it: which hook, when it was called (at, page time, ms), its payload without the server markup, and the region its element names (fp, entry, endpoint): the element is held weakly and a saved session part drops it, so the names carry the region past the page.

type HookEntry = { [K in RuntimeHookName]: {
  readonly hook: K;
  readonly at: number;
  readonly fp?: string;
  readonly entry?: string;
  readonly endpoint?: string;
  readonly el?: WeakRef<Element>;
} & Omit<HookPayload<K>, "el" | "ssrHtml">; }[RuntimeHookName];

HydrationStatus

type

An island's hydration status: worked out in the browser (devtools/hydration.ts), read by the testing API.

type HydrationStatus = "failed" | "recovered" | "healed" | "changed" | "asleep" | "clean";

IslandHazard

type

a hazard with the file it is in (the profiler's island chunks, the dev server's module graph)

type IslandHazard = Hazard & {
  file: string;
};

PartedVital

type

A VITAL'S PARTS, as numbers (the same splits the explanations word): TTFB by its steps, FCP by first byte / HTML / blocking / render, LCP by first byte / delay / download / render, INP by the slowest interaction's wait / handlers / paint. What "since your last profile" (the profiler) and "since your last load" (the Page tab) compare, to say which part of a moved vital moved. Null when the visit cannot tell.

type PartedVital = "ttfb" | "fcp" | "lcp" | "inp";

Ref

type

type Ref = {
  kind: "interaction";
  i: number;
} | {
  kind: "click";
  i: number;
} | {
  kind: "shift";
  i: number;
} | {
  kind: "island";
  fp: string;
};