chrome-devtools-frontend 1.0.1515796 → 1.0.1516909
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/docs/contributing/infrastructure.md +131 -82
- package/front_end/Tests.js +3 -29
- package/front_end/core/common/Progress.ts +73 -55
- package/front_end/core/host/GdpClient.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +5 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
- package/front_end/core/sdk/CSSModel.ts +1 -31
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
- package/front_end/core/sdk/DebuggerModel.ts +1 -31
- package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
- package/front_end/core/sdk/NetworkManager.ts +1 -31
- package/front_end/core/sdk/NetworkRequest.ts +1 -31
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -18
- package/front_end/core/sdk/RehydratingObject.ts +8 -31
- package/front_end/core/sdk/RemoteObject.ts +1 -31
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
- package/front_end/core/sdk/RuntimeModel.ts +1 -31
- package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
- package/front_end/core/sdk/SourceMap.ts +1 -31
- package/front_end/core/sdk/TraceObject.ts +8 -3
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
- package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +110 -76
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +24 -8
- package/front_end/models/badges/UserBadges.ts +38 -3
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
- package/front_end/models/formatter/FormatterWorkerPool.ts +3 -3
- package/front_end/models/har/Writer.ts +11 -11
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
- package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
- package/front_end/models/persistence/PersistenceImpl.ts +8 -8
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/trace/ModelImpl.ts +2 -16
- package/front_end/models/trace/Processor.ts +15 -9
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
- package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -4
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/types.ts +2 -0
- package/front_end/models/trace/types/TraceEvents.ts +41 -64
- package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
- package/front_end/panels/application/ServiceWorkersView.ts +0 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/common/BadgeNotification.ts +46 -10
- package/front_end/panels/common/GdpSignUpDialog.ts +6 -3
- package/front_end/panels/console/ConsoleView.ts +23 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -2
- package/front_end/panels/console/consoleView.css +11 -1
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/layers/LayerTreeModel.ts +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
- package/front_end/panels/network/NetworkLogView.ts +6 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkSearchScope.ts +6 -6
- package/front_end/panels/search/SearchResultsPane.ts +32 -47
- package/front_end/panels/search/SearchView.ts +58 -80
- package/front_end/panels/settings/components/SyncSection.ts +7 -2
- package/front_end/panels/sources/OutlineQuickOpen.ts +3 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
- package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
- package/front_end/panels/timeline/TimelinePanel.ts +41 -22
- package/front_end/panels/timeline/TimelineUIUtils.ts +13 -8
- package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
- package/front_end/third_party/axe-core/README.chromium +1 -0
- package/front_end/third_party/codemirror/README.chromium +1 -0
- package/front_end/third_party/codemirror.next/README.chromium +1 -0
- package/front_end/third_party/csp_evaluator/README.chromium +1 -0
- package/front_end/third_party/diff/README.chromium +1 -0
- package/front_end/third_party/i18n/README.chromium +1 -0
- package/front_end/third_party/intl-messageformat/README.chromium +1 -0
- package/front_end/third_party/json5/README.chromium +1 -0
- package/front_end/third_party/legacy-javascript/README.chromium +1 -0
- package/front_end/third_party/lighthouse/README.chromium +1 -0
- package/front_end/third_party/lit/README.chromium +1 -0
- package/front_end/third_party/marked/README.chromium +1 -0
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +2 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -21
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
- package/front_end/third_party/third-party-web/README.chromium +1 -0
- package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
- package/front_end/third_party/wasmparser/README.chromium +1 -0
- package/front_end/third_party/web-vitals/README.chromium +1 -0
- package/front_end/ui/components/text_editor/config.ts +30 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +18 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +7 -3
- package/front_end/ui/legacy/ProgressIndicator.ts +29 -16
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +10 -5
- package/front_end/ui/legacy/UIUtils.ts +42 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/inspector_overlay/highlight_common.ts +1 -27
- package/inspector_overlay/highlight_grid_common.ts +1 -27
- package/inspector_overlay/tool_highlight.ts +1 -27
- package/inspector_overlay/tool_persistent.ts +1 -27
- package/inspector_overlay/tool_source_order.ts +1 -27
- package/package.json +1 -1
@@ -37,15 +37,14 @@ import type {HandlerName} from './types.js';
|
|
37
37
|
// score for the given recording, and almost certainly not the
|
38
38
|
// navigation-to-unload CLS score.
|
39
39
|
|
40
|
-
interface
|
40
|
+
interface LayoutShiftsData {
|
41
41
|
clusters: readonly Types.Events.SyntheticLayoutShiftCluster[];
|
42
42
|
clustersByNavigationId: Map<Types.Events.NavigationId, Types.Events.SyntheticLayoutShiftCluster[]>;
|
43
43
|
sessionMaxScore: number;
|
44
44
|
// The session window which contains the SessionMaxScore
|
45
45
|
clsWindowID: number;
|
46
46
|
// We use these to calculate root causes for a given LayoutShift
|
47
|
-
|
48
|
-
prePaintEvents: Types.Events.PrePaint[];
|
47
|
+
prePaintEvents: readonly Types.Events.PrePaint[];
|
49
48
|
paintImageEvents: Types.Events.PaintImage[];
|
50
49
|
layoutInvalidationEvents: readonly Types.Events.LayoutInvalidationTracking[];
|
51
50
|
scheduleStyleInvalidationEvents: readonly Types.Events.ScheduleStyleInvalidationTracking[];
|
@@ -55,8 +54,7 @@ interface LayoutShifts {
|
|
55
54
|
layoutImageUnsizedEvents: readonly Types.Events.LayoutImageUnsized[];
|
56
55
|
remoteFonts: readonly RemoteFont[];
|
57
56
|
scoreRecords: readonly ScoreRecord[];
|
58
|
-
|
59
|
-
backendNodeIds: Protocol.DOM.BackendNodeId[];
|
57
|
+
backendNodeIds: Set<Protocol.DOM.BackendNodeId>;
|
60
58
|
}
|
61
59
|
|
62
60
|
interface RemoteFont {
|
@@ -524,7 +522,7 @@ async function buildLayoutShiftsClusters(): Promise<void> {
|
|
524
522
|
}
|
525
523
|
}
|
526
524
|
|
527
|
-
export function data():
|
525
|
+
export function data(): LayoutShiftsData {
|
528
526
|
return {
|
529
527
|
clusters,
|
530
528
|
sessionMaxScore,
|
@@ -532,15 +530,14 @@ export function data(): LayoutShifts {
|
|
532
530
|
prePaintEvents,
|
533
531
|
layoutInvalidationEvents,
|
534
532
|
scheduleStyleInvalidationEvents,
|
535
|
-
styleRecalcInvalidationEvents
|
533
|
+
styleRecalcInvalidationEvents,
|
536
534
|
renderFrameImplCreateChildFrameEvents,
|
537
535
|
domLoadingEvents,
|
538
536
|
layoutImageUnsizedEvents,
|
539
537
|
remoteFonts,
|
540
538
|
scoreRecords,
|
541
|
-
|
542
|
-
|
543
|
-
clustersByNavigationId: new Map(clustersByNavigationId),
|
539
|
+
backendNodeIds,
|
540
|
+
clustersByNavigationId,
|
544
541
|
paintImageEvents,
|
545
542
|
};
|
546
543
|
}
|
@@ -28,11 +28,15 @@ let devicePixelRatio: number|null = null;
|
|
28
28
|
let processNames = new Map<Types.Events.ProcessID, Types.Events.ProcessName>();
|
29
29
|
|
30
30
|
let topLevelRendererIds = new Set<Types.Events.ProcessID>();
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
|
32
|
+
function makeNewTraceBounds(): Types.Timing.TraceWindowMicro {
|
33
|
+
return {
|
34
|
+
min: Types.Timing.Micro(Number.POSITIVE_INFINITY),
|
35
|
+
max: Types.Timing.Micro(Number.NEGATIVE_INFINITY),
|
36
|
+
range: Types.Timing.Micro(Number.POSITIVE_INFINITY),
|
37
|
+
};
|
38
|
+
}
|
39
|
+
let traceBounds: Types.Timing.TraceWindowMicro = makeNewTraceBounds();
|
36
40
|
|
37
41
|
/**
|
38
42
|
* These represent the user navigating. Values such as First Contentful Paint,
|
@@ -98,9 +102,7 @@ export function reset(): void {
|
|
98
102
|
rendererProcessesByFrameId = new Map();
|
99
103
|
framesByProcessId = new Map();
|
100
104
|
|
101
|
-
traceBounds
|
102
|
-
traceBounds.max = Types.Timing.Micro(Number.NEGATIVE_INFINITY);
|
103
|
-
traceBounds.range = Types.Timing.Micro(Number.POSITIVE_INFINITY);
|
105
|
+
traceBounds = makeNewTraceBounds();
|
104
106
|
traceStartedTimeFromTracingStartedEvent = Types.Timing.Micro(-1);
|
105
107
|
|
106
108
|
traceIsGeneric = true;
|
@@ -490,7 +492,7 @@ export type FrameProcessData =
|
|
490
492
|
|
491
493
|
export function data(): MetaHandlerData {
|
492
494
|
return {
|
493
|
-
traceBounds
|
495
|
+
traceBounds,
|
494
496
|
browserProcessId,
|
495
497
|
browserThreadId,
|
496
498
|
processNames,
|
@@ -109,7 +109,7 @@ export interface Data {
|
|
109
109
|
legacySyntheticScreenshots: Types.Events.LegacySyntheticScreenshot[]|null;
|
110
110
|
screenshots: Types.Events.Screenshot[]|null;
|
111
111
|
}
|
112
|
-
|
112
|
+
|
113
113
|
export function data(): Data {
|
114
114
|
return {
|
115
115
|
legacySyntheticScreenshots: syntheticScreenshots.length ? syntheticScreenshots : null,
|
@@ -54,14 +54,14 @@ export function reset(): void {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
export function handleEvent(event: Types.Events.Event): void {
|
57
|
-
const getOrMakeScript = (isolate: string, scriptIdAsNumber: number): Script => {
|
57
|
+
const getOrMakeScript = (isolate: string|number, scriptIdAsNumber: number): Script => {
|
58
58
|
const scriptId = String(scriptIdAsNumber) as Protocol.Runtime.ScriptId;
|
59
59
|
const key = `${isolate}.${scriptId}`;
|
60
60
|
return Platform.MapUtilities.getWithDefault(
|
61
61
|
scriptById, key, () => ({isolate, scriptId, frame: '', ts: 0} as Script));
|
62
62
|
};
|
63
63
|
|
64
|
-
if (Types.Events.
|
64
|
+
if (Types.Events.isRundownScriptCompiled(event) && event.args.data) {
|
65
65
|
const {isolate, scriptId, frame} = event.args.data;
|
66
66
|
const script = getOrMakeScript(isolate, scriptId);
|
67
67
|
script.frame = frame;
|
@@ -70,7 +70,7 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
70
70
|
return;
|
71
71
|
}
|
72
72
|
|
73
|
-
if (Types.Events.
|
73
|
+
if (Types.Events.isRundownScript(event)) {
|
74
74
|
const {isolate, scriptId, url, sourceUrl, sourceMapUrl, sourceMapUrlElided} = event.args.data;
|
75
75
|
const script = getOrMakeScript(isolate, scriptId);
|
76
76
|
script.url = url;
|
@@ -91,14 +91,14 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
91
91
|
return;
|
92
92
|
}
|
93
93
|
|
94
|
-
if (Types.Events.
|
94
|
+
if (Types.Events.isRundownScriptSource(event)) {
|
95
95
|
const {isolate, scriptId, sourceText} = event.args.data;
|
96
96
|
const script = getOrMakeScript(isolate, scriptId);
|
97
97
|
script.content = sourceText;
|
98
98
|
return;
|
99
99
|
}
|
100
100
|
|
101
|
-
if (Types.Events.
|
101
|
+
if (Types.Events.isRundownScriptSourceLarge(event)) {
|
102
102
|
const {isolate, scriptId, sourceText} = event.args.data;
|
103
103
|
const script = getOrMakeScript(isolate, scriptId);
|
104
104
|
script.content = (script.content ?? '') + sourceText;
|
@@ -9,14 +9,8 @@ import {data as metaHandlerData} from './MetaHandler.js';
|
|
9
9
|
import {ScoreClassification} from './PageLoadMetricsHandler.js';
|
10
10
|
import type {HandlerName} from './types.js';
|
11
11
|
|
12
|
-
// This handler
|
13
|
-
//
|
14
|
-
// EventTimings into Interactions, which we use to show interactions and
|
15
|
-
// highlight long interactions to the user, along with INP.
|
16
|
-
|
17
|
-
// We don't need to know which process / thread these events occurred in,
|
18
|
-
// because they are effectively global, so we just track all that we find.
|
19
|
-
let allEvents: Types.Events.EventTimingBeginOrEnd[] = [];
|
12
|
+
// This handler gathers EventTimings into Interactions, which we use to show
|
13
|
+
// interactions and highlight long interactions to the user, along with INP.
|
20
14
|
|
21
15
|
let beginCommitCompositorFrameEvents: Types.Events.BeginCommitCompositorFrame[] = [];
|
22
16
|
let parseMetaViewportEvents: Types.Events.ParseMetaViewport[] = [];
|
@@ -27,8 +21,6 @@ const INP_GOOD_TIMING = LONG_INTERACTION_THRESHOLD;
|
|
27
21
|
const INP_MEDIUM_TIMING = Helpers.Timing.milliToMicro(Types.Timing.Milli(500));
|
28
22
|
|
29
23
|
export interface UserInteractionsData {
|
30
|
-
/** All the user events we found in the trace */
|
31
|
-
allEvents: readonly Types.Events.EventTimingBeginOrEnd[];
|
32
24
|
/** All the BeginCommitCompositorFrame events we found in the trace */
|
33
25
|
beginCommitCompositorFrameEvents: readonly Types.Events.BeginCommitCompositorFrame[];
|
34
26
|
/** All the ParseMetaViewport events we found in the trace */
|
@@ -68,7 +60,6 @@ let eventTimingEndEventsById = new Map<string, Types.Events.EventTimingEnd>();
|
|
68
60
|
let eventTimingStartEventsForInteractions: Types.Events.EventTimingBegin[] = [];
|
69
61
|
|
70
62
|
export function reset(): void {
|
71
|
-
allEvents = [];
|
72
63
|
beginCommitCompositorFrameEvents = [];
|
73
64
|
parseMetaViewportEvents = [];
|
74
65
|
interactionEvents = [];
|
@@ -98,8 +89,6 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
98
89
|
eventTimingEndEventsById.set(event.id, event);
|
99
90
|
}
|
100
91
|
|
101
|
-
allEvents.push(event);
|
102
|
-
|
103
92
|
// From this point on we want to find events that represent interactions.
|
104
93
|
// These events are always start events - those are the ones that contain all
|
105
94
|
// the metadata about the interaction.
|
@@ -351,7 +340,6 @@ export async function finalize(): Promise<void> {
|
|
351
340
|
|
352
341
|
export function data(): UserInteractionsData {
|
353
342
|
return {
|
354
|
-
allEvents,
|
355
343
|
beginCommitCompositorFrameEvents,
|
356
344
|
parseMetaViewportEvents,
|
357
345
|
interactionEvents,
|
@@ -226,9 +226,8 @@ export function data(): UserTimingsData {
|
|
226
226
|
performanceMeasures: syntheticEvents.filter(e => e.cat === 'blink.user_timing') as
|
227
227
|
Types.Events.SyntheticUserTimingPair[],
|
228
228
|
consoleTimings: syntheticEvents.filter(e => e.cat === 'blink.console') as Types.Events.SyntheticConsoleTimingPair[],
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
measureTraceByTraceId: new Map(measureTraceByTraceId),
|
229
|
+
performanceMarks: performanceMarkEvents,
|
230
|
+
timestampEvents,
|
231
|
+
measureTraceByTraceId,
|
233
232
|
};
|
234
233
|
}
|
@@ -471,7 +471,7 @@ function getUnsizedImageRootCauses(
|
|
471
471
|
return rootCausesByShift;
|
472
472
|
}
|
473
473
|
|
474
|
-
export function
|
474
|
+
export function isCLSCulpritsInsight(insight: InsightModel): insight is CLSCulpritsInsightModel {
|
475
475
|
return insight.insightKey === InsightKeys.CLS_CULPRITS;
|
476
476
|
}
|
477
477
|
|
@@ -81,7 +81,7 @@ const TARGET_MS = 100;
|
|
81
81
|
// Threshold for compression savings.
|
82
82
|
const IGNORE_THRESHOLD_IN_BYTES = 1400;
|
83
83
|
|
84
|
-
export function
|
84
|
+
export function isDocumentLatencyInsight(x: InsightModel): x is DocumentLatencyInsightModel {
|
85
85
|
return x.insightKey === 'DocumentLatency';
|
86
86
|
}
|
87
87
|
|
@@ -190,13 +190,12 @@ function finalize(partialModel: PartialInsightModel<DocumentLatencyInsightModel>
|
|
190
190
|
}
|
191
191
|
|
192
192
|
export function generateInsight(
|
193
|
-
data: Handlers.Types.HandlerData, context: InsightSetContext
|
194
|
-
timeFormatters?: Types.Configuration.InsightTimeFormatters): DocumentLatencyInsightModel {
|
193
|
+
data: Handlers.Types.HandlerData, context: InsightSetContext): DocumentLatencyInsightModel {
|
195
194
|
if (!context.navigation) {
|
196
195
|
return finalize({});
|
197
196
|
}
|
198
197
|
|
199
|
-
const millisToString =
|
198
|
+
const millisToString = context.options.insightTimeFormatters?.milli ?? i18n.TimeUtilities.millisToString;
|
200
199
|
|
201
200
|
const documentRequest = data.NetworkRequests.byId.get(context.navigationId);
|
202
201
|
if (!documentRequest) {
|
@@ -60,7 +60,7 @@ function finalize(partialModel: PartialInsightModel<DuplicatedJavaScriptInsightM
|
|
60
60
|
};
|
61
61
|
}
|
62
62
|
|
63
|
-
export function
|
63
|
+
export function isDuplicatedJavaScriptInsight(model: InsightModel): model is DuplicatedJavaScriptInsightModel {
|
64
64
|
return model.insightKey === InsightKeys.DUPLICATE_JAVASCRIPT;
|
65
65
|
}
|
66
66
|
|
@@ -62,7 +62,7 @@ export type INPBreakdownInsightModel = InsightModel<typeof UIStrings, {
|
|
62
62
|
highPercentileInteractionEvent?: SyntheticInteractionPair,
|
63
63
|
}>;
|
64
64
|
|
65
|
-
export function
|
65
|
+
export function isINPBreakdownInsight(insight: InsightModel): insight is INPBreakdownInsightModel {
|
66
66
|
return insight.insightKey === InsightKeys.INP_BREAKDOWN;
|
67
67
|
}
|
68
68
|
|
@@ -134,7 +134,7 @@ export type ImageDeliveryInsightModel = InsightModel<typeof UIStrings, {
|
|
134
134
|
wastedBytes: number,
|
135
135
|
}>;
|
136
136
|
|
137
|
-
export function
|
137
|
+
export function isImageDeliveryInsight(model: InsightModel): model is ImageDeliveryInsightModel {
|
138
138
|
return model.insightKey === 'ImageDelivery';
|
139
139
|
}
|
140
140
|
|
@@ -89,7 +89,7 @@ interface LCPSubparts {
|
|
89
89
|
renderDelay: Subpart;
|
90
90
|
}
|
91
91
|
|
92
|
-
export function
|
92
|
+
export function isLCPBreakdownInsight(model: InsightModel): model is LCPBreakdownInsightModel {
|
93
93
|
return model.insightKey === 'LCPBreakdown';
|
94
94
|
}
|
95
95
|
export type LCPBreakdownInsightModel = InsightModel<typeof UIStrings, {
|
@@ -62,7 +62,7 @@ export const UIStrings = {
|
|
62
62
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LCPDiscovery.ts', UIStrings);
|
63
63
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
64
64
|
|
65
|
-
export function
|
65
|
+
export function isLCPDiscoveryInsight(model: InsightModel): model is LCPDiscoveryInsightModel {
|
66
66
|
return model.insightKey === 'LCPDiscovery';
|
67
67
|
}
|
68
68
|
export type LCPDiscoveryInsightModel = InsightModel<typeof UIStrings, {
|
@@ -50,7 +50,7 @@ export type ModernHTTPInsightModel = InsightModel<typeof UIStrings, {
|
|
50
50
|
http1Requests: Types.Events.SyntheticNetworkRequest[],
|
51
51
|
}>;
|
52
52
|
|
53
|
-
export function
|
53
|
+
export function isModernHTTPInsight(model: InsightModel): model is ModernHTTPInsightModel {
|
54
54
|
return model.insightKey === InsightKeys.MODERN_HTTP;
|
55
55
|
}
|
56
56
|
|
@@ -666,7 +666,7 @@ export function generatePreconnectCandidates(
|
|
666
666
|
return preconnectCandidates.slice(0, TOO_MANY_PRECONNECTS_THRESHOLD);
|
667
667
|
}
|
668
668
|
|
669
|
-
export function
|
669
|
+
export function isNetworkDependencyTreeInsight(model: InsightModel): model is NetworkDependencyTreeInsightModel {
|
670
670
|
return model.insightKey === InsightKeys.NETWORK_DEPENDENCY_TREE;
|
671
671
|
}
|
672
672
|
|
@@ -48,7 +48,7 @@ export const UIStrings = {
|
|
48
48
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/RenderBlocking.ts', UIStrings);
|
49
49
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
50
50
|
|
51
|
-
export function
|
51
|
+
export function isRenderBlockingInsight(insight: InsightModel): insight is RenderBlockingInsightModel {
|
52
52
|
return insight.insightKey === 'RenderBlocking';
|
53
53
|
}
|
54
54
|
|
@@ -14,12 +14,14 @@ import type * as Models from './Models.js';
|
|
14
14
|
export type InsightSetContext = InsightSetContextWithoutNavigation|InsightSetContextWithNavigation;
|
15
15
|
|
16
16
|
export interface InsightSetContextWithoutNavigation {
|
17
|
+
options: Types.Configuration.ParseOptions;
|
17
18
|
bounds: Types.Timing.TraceWindowMicro;
|
18
19
|
frameId: string;
|
19
20
|
navigation?: never;
|
20
21
|
}
|
21
22
|
|
22
23
|
export interface InsightSetContextWithNavigation {
|
24
|
+
options: Types.Configuration.ParseOptions;
|
23
25
|
bounds: Types.Timing.TraceWindowMicro;
|
24
26
|
frameId: string;
|
25
27
|
navigation: Types.Events.NavigationStart;
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import type * as Platform from '../../../core/platform/platform.js';
|
6
|
+
import type * as SDK from '../../../core/sdk/sdk.js';
|
6
7
|
import type * as Protocol from '../../../generated/protocol.js';
|
7
8
|
|
8
9
|
import type {Micro, Milli, Seconds, TraceWindowMicro} from './Timing.js';
|
@@ -207,7 +208,7 @@ export interface RunTask extends Complete {
|
|
207
208
|
name: Name.RUN_TASK;
|
208
209
|
}
|
209
210
|
export function isRunTask(event: Event): event is RunTask {
|
210
|
-
return event.name === Name.RUN_TASK;
|
211
|
+
return event.name === Name.RUN_TASK && event.ph === Phase.COMPLETE;
|
211
212
|
}
|
212
213
|
|
213
214
|
export interface FireIdleCallback extends Complete {
|
@@ -2072,7 +2073,7 @@ export function isEnd(event: Event): event is End {
|
|
2072
2073
|
}
|
2073
2074
|
|
2074
2075
|
export function isDispatch(event: Event): event is Dispatch {
|
2075
|
-
return event.name === 'EventDispatch';
|
2076
|
+
return event.name === 'EventDispatch' && event.ph === Phase.COMPLETE;
|
2076
2077
|
}
|
2077
2078
|
|
2078
2079
|
export function isInstant(event: Event): event is Instant {
|
@@ -2084,7 +2085,7 @@ export function isRendererEvent(event: Event): event is RendererEvent {
|
|
2084
2085
|
}
|
2085
2086
|
|
2086
2087
|
export function isFireIdleCallback(event: Event): event is FireIdleCallback {
|
2087
|
-
return event.name === 'FireIdleCallback';
|
2088
|
+
return event.name === 'FireIdleCallback' && event.ph === Phase.COMPLETE;
|
2088
2089
|
}
|
2089
2090
|
|
2090
2091
|
export function isSchedulePostMessage(event: Event): event is SchedulePostMessage {
|
@@ -2092,7 +2093,7 @@ export function isSchedulePostMessage(event: Event): event is SchedulePostMessag
|
|
2092
2093
|
}
|
2093
2094
|
|
2094
2095
|
export function isHandlePostMessage(event: Event): event is HandlePostMessage {
|
2095
|
-
return event.name === Name.HANDLE_POST_MESSAGE;
|
2096
|
+
return event.name === Name.HANDLE_POST_MESSAGE && event.ph === Phase.COMPLETE;
|
2096
2097
|
}
|
2097
2098
|
|
2098
2099
|
export function isUpdateCounters(event: Event): event is UpdateCounters {
|
@@ -2213,7 +2214,7 @@ export function isProfile(event: Event): event is Profile {
|
|
2213
2214
|
}
|
2214
2215
|
|
2215
2216
|
export function isSyntheticCpuProfile(event: Event): event is SyntheticCpuProfile {
|
2216
|
-
return event.name === Name.CPU_PROFILE;
|
2217
|
+
return event.name === Name.CPU_PROFILE && event.ph === Phase.COMPLETE;
|
2217
2218
|
}
|
2218
2219
|
|
2219
2220
|
export function isProfileChunk(event: Event): event is ProfileChunk {
|
@@ -2308,7 +2309,7 @@ export interface DidCommitSameDocumentNavigation extends Complete {
|
|
2308
2309
|
}
|
2309
2310
|
|
2310
2311
|
export function isDidCommitSameDocumentNavigation(event: Event): event is DidCommitSameDocumentNavigation {
|
2311
|
-
return event.name === 'RenderFrameHostImpl::DidCommitSameDocumentNavigation';
|
2312
|
+
return event.name === 'RenderFrameHostImpl::DidCommitSameDocumentNavigation' && event.ph === Phase.COMPLETE;
|
2312
2313
|
}
|
2313
2314
|
|
2314
2315
|
export function isMainFrameViewport(
|
@@ -2400,7 +2401,7 @@ export function isProfileCall(event: Event): event is SyntheticProfileCall {
|
|
2400
2401
|
return 'callFrame' in event;
|
2401
2402
|
}
|
2402
2403
|
|
2403
|
-
export interface Paint extends
|
2404
|
+
export interface Paint extends Event {
|
2404
2405
|
name: Name.PAINT;
|
2405
2406
|
args: Args&{
|
2406
2407
|
data: ArgsData & {
|
@@ -2444,7 +2445,7 @@ export interface PaintImage extends Complete {
|
|
2444
2445
|
};
|
2445
2446
|
}
|
2446
2447
|
export function isPaintImage(event: Event): event is PaintImage {
|
2447
|
-
return event.name === Name.PAINT_IMAGE;
|
2448
|
+
return event.name === Name.PAINT_IMAGE && event.ph === Phase.COMPLETE;
|
2448
2449
|
}
|
2449
2450
|
|
2450
2451
|
export interface ScrollLayer extends Complete {
|
@@ -2457,7 +2458,7 @@ export interface ScrollLayer extends Complete {
|
|
2457
2458
|
};
|
2458
2459
|
}
|
2459
2460
|
export function isScrollLayer(event: Event): event is ScrollLayer {
|
2460
|
-
return event.name === Name.SCROLL_LAYER;
|
2461
|
+
return event.name === Name.SCROLL_LAYER && event.ph === Phase.COMPLETE;
|
2461
2462
|
}
|
2462
2463
|
|
2463
2464
|
export interface SetLayerTreeId extends Instant {
|
@@ -2472,7 +2473,7 @@ export interface SetLayerTreeId extends Instant {
|
|
2472
2473
|
export function isSetLayerId(event: Event): event is SetLayerTreeId {
|
2473
2474
|
return event.name === Name.SET_LAYER_TREE_ID;
|
2474
2475
|
}
|
2475
|
-
export interface UpdateLayer extends
|
2476
|
+
export interface UpdateLayer extends Event {
|
2476
2477
|
name: Name.UPDATE_LAYER;
|
2477
2478
|
args: Args&{
|
2478
2479
|
layerId: number,
|
@@ -2571,7 +2572,7 @@ export interface FireAnimationFrame extends Complete {
|
|
2571
2572
|
}
|
2572
2573
|
|
2573
2574
|
export function isFireAnimationFrame(event: Event): event is FireAnimationFrame {
|
2574
|
-
return event.name === Name.FIRE_ANIMATION_FRAME;
|
2575
|
+
return event.name === Name.FIRE_ANIMATION_FRAME && event.ph === Phase.COMPLETE;
|
2575
2576
|
}
|
2576
2577
|
|
2577
2578
|
export interface RequestAnimationFrame extends Instant {
|
@@ -2611,7 +2612,7 @@ export interface TimerFire extends Complete {
|
|
2611
2612
|
};
|
2612
2613
|
}
|
2613
2614
|
export function isTimerFire(event: Event): event is TimerFire {
|
2614
|
-
return event.name === Name.TIMER_FIRE;
|
2615
|
+
return event.name === Name.TIMER_FIRE && event.ph === Phase.COMPLETE;
|
2615
2616
|
}
|
2616
2617
|
|
2617
2618
|
export interface RequestIdleCallback extends Instant {
|
@@ -2773,7 +2774,7 @@ export interface V8Compile extends Complete {
|
|
2773
2774
|
};
|
2774
2775
|
}
|
2775
2776
|
export function isV8Compile(event: Event): event is V8Compile {
|
2776
|
-
return event.name === Name.COMPILE;
|
2777
|
+
return event.name === Name.COMPILE && event.ph === Phase.COMPLETE;
|
2777
2778
|
}
|
2778
2779
|
|
2779
2780
|
export interface FunctionCall extends Complete {
|
@@ -2781,11 +2782,12 @@ export interface FunctionCall extends Complete {
|
|
2781
2782
|
args: Args&{
|
2782
2783
|
data?: Partial<CallFrame>& {
|
2783
2784
|
frame?: string,
|
2785
|
+
isolate?: number,
|
2784
2786
|
},
|
2785
2787
|
};
|
2786
2788
|
}
|
2787
2789
|
export function isFunctionCall(event: Event): event is FunctionCall {
|
2788
|
-
return event.name === Name.FUNCTION_CALL;
|
2790
|
+
return event.name === Name.FUNCTION_CALL && event.ph === Phase.COMPLETE;
|
2789
2791
|
}
|
2790
2792
|
|
2791
2793
|
export interface SchedulePostTaskCallback extends Instant {
|
@@ -2816,7 +2818,7 @@ export interface RunPostTaskCallback extends Complete {
|
|
2816
2818
|
};
|
2817
2819
|
}
|
2818
2820
|
export function isRunPostTaskCallback(event: Event): event is RunPostTaskCallback {
|
2819
|
-
return event.name === Name.RUN_POST_TASK_CALLBACK;
|
2821
|
+
return event.name === Name.RUN_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
|
2820
2822
|
}
|
2821
2823
|
|
2822
2824
|
export interface AbortPostTaskCallback extends Complete {
|
@@ -2830,7 +2832,7 @@ export interface AbortPostTaskCallback extends Complete {
|
|
2830
2832
|
};
|
2831
2833
|
}
|
2832
2834
|
export function isAbortPostTaskCallback(event: Event): event is RunPostTaskCallback {
|
2833
|
-
return event.name === Name.ABORT_POST_TASK_CALLBACK;
|
2835
|
+
return event.name === Name.ABORT_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
|
2834
2836
|
}
|
2835
2837
|
|
2836
2838
|
/**
|
@@ -2894,7 +2896,7 @@ export interface ParseAuthorStyleSheet extends Complete {
|
|
2894
2896
|
}
|
2895
2897
|
|
2896
2898
|
export function isParseAuthorStyleSheetEvent(event: Event): event is ParseAuthorStyleSheet {
|
2897
|
-
return event.name === Name.PARSE_AUTHOR_STYLE_SHEET;
|
2899
|
+
return event.name === Name.PARSE_AUTHOR_STYLE_SHEET && event.ph === Phase.COMPLETE;
|
2898
2900
|
}
|
2899
2901
|
|
2900
2902
|
/**
|
@@ -3177,75 +3179,51 @@ export interface LegacyLayerPaintEventPicture {
|
|
3177
3179
|
serializedPicture: string;
|
3178
3180
|
}
|
3179
3181
|
|
3180
|
-
|
3182
|
+
/** Same as `TraceEventTargetRundown` in `EnhancedTracesParser` */
|
3183
|
+
export interface RundownScriptCompiled extends Event {
|
3181
3184
|
cat: 'disabled-by-default-devtools.target-rundown';
|
3182
|
-
name: '
|
3185
|
+
name: SDK.EnhancedTracesParser.RundownScriptCompiled['name'];
|
3183
3186
|
args: Args&{
|
3184
|
-
data?:
|
3185
|
-
frame: Protocol.Page.FrameId,
|
3186
|
-
frameType: string,
|
3187
|
-
url: string,
|
3188
|
-
isolate: string,
|
3189
|
-
v8context: string,
|
3190
|
-
origin: string,
|
3191
|
-
scriptId: number,
|
3192
|
-
isDefault?: boolean,
|
3193
|
-
contextType?: string,
|
3194
|
-
},
|
3187
|
+
data?: SDK.EnhancedTracesParser.RundownScriptCompiled['args']['data'],
|
3195
3188
|
};
|
3196
3189
|
}
|
3197
3190
|
|
3198
|
-
export function
|
3199
|
-
return event.cat === 'disabled-by-default-devtools.target-rundown'
|
3191
|
+
export function isRundownScriptCompiled(event: Event): event is RundownScriptCompiled {
|
3192
|
+
return event.cat === 'disabled-by-default-devtools.target-rundown';
|
3200
3193
|
}
|
3201
3194
|
|
3202
|
-
|
3195
|
+
/** Same as `TraceEventScriptRundown` in `EnhancedTracesParser` */
|
3196
|
+
export interface RundownScript extends Event {
|
3203
3197
|
cat: 'disabled-by-default-devtools.v8-source-rundown';
|
3204
|
-
name: '
|
3198
|
+
name: SDK.EnhancedTracesParser.RundownScript['name'];
|
3205
3199
|
args: Args&{
|
3206
|
-
data:
|
3207
|
-
isolate: string,
|
3208
|
-
executionContextId: Protocol.Runtime.ExecutionContextId,
|
3209
|
-
scriptId: number,
|
3210
|
-
hash: string,
|
3211
|
-
isModule: boolean,
|
3212
|
-
hasSourceUrl: boolean,
|
3213
|
-
url?: string,
|
3214
|
-
sourceUrl?: string,
|
3215
|
-
sourceMapUrl?: string,
|
3216
|
-
sourceMapUrlElided?: boolean,
|
3217
|
-
},
|
3200
|
+
data: SDK.EnhancedTracesParser.RundownScript['args']['data'],
|
3218
3201
|
};
|
3219
3202
|
}
|
3220
3203
|
|
3221
|
-
export function
|
3204
|
+
export function isRundownScript(event: Event): event is RundownScript {
|
3222
3205
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown' && event.name === 'ScriptCatchup';
|
3223
3206
|
}
|
3224
3207
|
|
3225
|
-
|
3208
|
+
/** Same as `TraceEventScriptRundownSource` in `EnhancedTracesParser` */
|
3209
|
+
export interface RundownScriptSource extends Event {
|
3226
3210
|
cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
|
3227
3211
|
name: 'ScriptCatchup';
|
3228
3212
|
args: Args&{
|
3229
|
-
data:
|
3230
|
-
isolate: string,
|
3231
|
-
scriptId: number,
|
3232
|
-
length: number,
|
3233
|
-
sourceText: string,
|
3234
|
-
},
|
3213
|
+
data: SDK.EnhancedTracesParser.RundownScriptSource['args']['data'],
|
3235
3214
|
};
|
3236
3215
|
}
|
3237
3216
|
|
3238
|
-
export function
|
3239
|
-
event is V8SourceRundownSourcesScriptCatchupEvent {
|
3217
|
+
export function isRundownScriptSource(event: Event): event is RundownScriptSource {
|
3240
3218
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'ScriptCatchup';
|
3241
3219
|
}
|
3242
3220
|
|
3243
|
-
export interface
|
3221
|
+
export interface RundownScriptSourceLarge extends Event {
|
3244
3222
|
cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
|
3245
3223
|
name: 'LargeScriptCatchup';
|
3246
3224
|
args: Args&{
|
3247
3225
|
data: {
|
3248
|
-
isolate:
|
3226
|
+
isolate: number,
|
3249
3227
|
scriptId: number,
|
3250
3228
|
splitIndex: number,
|
3251
3229
|
splitCount: number,
|
@@ -3254,23 +3232,22 @@ export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
|
|
3254
3232
|
};
|
3255
3233
|
}
|
3256
3234
|
|
3257
|
-
export function
|
3258
|
-
event is V8SourceRundownSourcesLargeScriptCatchupEvent {
|
3235
|
+
export function isRundownScriptSourceLarge(event: Event): event is RundownScriptSourceLarge {
|
3259
3236
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'LargeScriptCatchup';
|
3260
3237
|
}
|
3261
3238
|
|
3262
|
-
export interface
|
3239
|
+
export interface RundownScriptStub extends Event {
|
3263
3240
|
cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
|
3264
3241
|
name: 'StubScriptCatchup';
|
3265
3242
|
args: Args&{
|
3266
3243
|
data: {
|
3267
|
-
isolate:
|
3244
|
+
isolate: number,
|
3268
3245
|
scriptId: number,
|
3269
3246
|
},
|
3270
3247
|
};
|
3271
3248
|
}
|
3272
3249
|
|
3273
|
-
export function
|
3274
|
-
|
3250
|
+
export function isAnyScriptSourceEvent(event: Event): event is RundownScriptSource|RundownScriptSourceLarge|
|
3251
|
+
RundownScriptStub {
|
3275
3252
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources';
|
3276
3253
|
}
|