@paulirish/trace_engine 0.0.67-beta.0 → 0.0.67-beta.2
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/README.md +60 -22
- package/core/common/ParsedURL.d.ts +8 -0
- package/core/common/Settings.d.ts +2 -0
- package/core/host/Platform.d.ts +5 -0
- package/core/host/UserMetricsEnums.d.ts +8 -3
- package/core/platform/StringUtilities.d.ts +21 -0
- package/core/root/ExperimentNames.d.ts +2 -1
- package/core/root/Runtime.d.ts +4 -2
- package/core/sdk/CSSModel.d.ts +5 -0
- package/core/sdk/CSSPropertyParser.d.ts +0 -5
- package/core/sdk/DOMModel.d.ts +8 -4
- package/core/sdk/DebuggerModel.d.ts +37 -4
- package/core/sdk/NetworkRequest.d.ts +30 -2
- package/core/sdk/ResourceTreeModel.d.ts +3 -1
- package/core/sdk/RuntimeModel.d.ts +1 -0
- package/core/sdk/SDKSettings.d.ts +1 -0
- package/core/sdk/SourceMap.d.ts +20 -6
- package/core/sdk/SourceMapFunctionRanges.d.ts +3 -6
- package/core/sdk/SourceMapScopesInfo.d.ts +98 -23
- package/core/text_utils/Markdown.d.ts +13 -0
- package/core/text_utils/text_utils.d.ts +2 -1
- package/entrypoints/formatter_actions/formatter_actions.d.ts +17 -0
- package/generated/protocol-mapping.d.ts +64 -9
- package/generated/protocol-proxy-api.d.ts +58 -7
- package/generated/protocol.d.ts +93 -30
- package/index.d.ts +2 -0
- package/locales/af.json +129 -126
- package/locales/am.json +128 -125
- package/locales/ar.json +130 -127
- package/locales/as.json +130 -127
- package/locales/az.json +130 -127
- package/locales/be.json +128 -125
- package/locales/bg.json +130 -127
- package/locales/bn.json +130 -127
- package/locales/bs.json +130 -127
- package/locales/ca.json +130 -127
- package/locales/cs.json +128 -125
- package/locales/cy.json +130 -127
- package/locales/da.json +129 -126
- package/locales/de.json +130 -127
- package/locales/el.json +130 -127
- package/locales/en-GB.json +130 -127
- package/locales/en-US.json +1058 -0
- package/locales/es-419.json +129 -126
- package/locales/es.json +130 -127
- package/locales/et.json +95 -92
- package/locales/eu.json +130 -127
- package/locales/fa.json +130 -127
- package/locales/fi.json +129 -126
- package/locales/fil.json +130 -127
- package/locales/fr-CA.json +130 -127
- package/locales/fr.json +130 -127
- package/locales/gl.json +130 -127
- package/locales/gu.json +130 -127
- package/locales/he.json +130 -127
- package/locales/hi.json +130 -127
- package/locales/hr.json +128 -125
- package/locales/hu.json +90 -87
- package/locales/hy.json +127 -124
- package/locales/id.json +130 -127
- package/locales/is.json +129 -126
- package/locales/it.json +130 -127
- package/locales/ja.json +130 -127
- package/locales/ka.json +129 -126
- package/locales/kk.json +38 -35
- package/locales/km.json +130 -127
- package/locales/kn.json +130 -127
- package/locales/ko.json +22 -19
- package/locales/ky.json +130 -127
- package/locales/lo.json +130 -127
- package/locales/lt.json +130 -127
- package/locales/lv.json +66 -63
- package/locales/mk.json +130 -127
- package/locales/ml.json +129 -126
- package/locales/mn.json +129 -126
- package/locales/mr.json +130 -127
- package/locales/ms.json +130 -127
- package/locales/my.json +130 -127
- package/locales/ne.json +128 -125
- package/locales/nl.json +129 -126
- package/locales/no.json +130 -127
- package/locales/or.json +130 -127
- package/locales/pa.json +130 -127
- package/locales/pl.json +130 -127
- package/locales/pt-PT.json +129 -126
- package/locales/pt.json +130 -127
- package/locales/ro.json +129 -126
- package/locales/ru.json +50 -47
- package/locales/si.json +130 -127
- package/locales/sk.json +130 -127
- package/locales/sl.json +130 -127
- package/locales/sq.json +129 -126
- package/locales/sr-Latn.json +130 -127
- package/locales/sr.json +130 -127
- package/locales/sv.json +130 -127
- package/locales/sw.json +130 -127
- package/locales/ta.json +129 -126
- package/locales/te.json +130 -127
- package/locales/th.json +92 -89
- package/locales/tr.json +129 -126
- package/locales/uk.json +128 -125
- package/locales/ur.json +130 -127
- package/locales/uz.json +126 -123
- package/locales/vi.json +130 -127
- package/locales/zh-HK.json +130 -127
- package/locales/zh-TW.json +130 -127
- package/locales/zh.json +130 -127
- package/locales/zu.json +129 -126
- package/models/emulation/DeviceModeModel.d.ts +1 -0
- package/models/formatter/FormatterWorkerPool.d.ts +2 -2
- package/models/formatter/ScriptFormatter.d.ts +2 -2
- package/models/trace/extras/StackTraceForEvent.d.ts +1 -1
- package/models/trace/handlers/AnimationFramesHandler.d.ts +1 -1
- package/models/trace/handlers/AsyncJSCallsHandler.d.ts +2 -2
- package/models/trace/handlers/ImagePaintingHandler.d.ts +2 -2
- package/models/trace/handlers/InitiatorsHandler.d.ts +2 -2
- package/models/trace/handlers/LayerTreeHandler.d.ts +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.d.ts +1 -1
- package/models/trace/handlers/PageLoadMetricsHandler.d.ts +1 -1
- package/models/trace/handlers/ScriptsHandler.d.ts +1 -1
- package/models/trace/handlers/WarningsHandler.d.ts +1 -1
- package/models/trace/helpers/SamplesIntegrator.d.ts +3 -1
- package/models/trace/helpers/Trace.d.ts +2 -0
- package/models/trace/insights/CLSCulprits.d.ts +1 -1
- package/models/trace/insights/DuplicatedJavaScript.d.ts +1 -1
- package/models/trace/insights/ImageDelivery.d.ts +1 -0
- package/models/trace/lantern/core/NetworkAnalyzer.d.ts +1 -0
- package/models/trace/lantern/graph/CPUNode.d.ts +4 -2
- package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
- package/models/trace/lantern/types/Lantern.d.ts +15 -0
- package/models/trace/trace.js +21 -4
- package/models/trace/types/Overlays.d.ts +4 -3
- package/models/trace/types/TraceEvents.d.ts +184 -124
- package/package.json +14 -4
- package/third_party/marked/marked.d.ts +2 -0
- package/third_party/marked/package/lib/marked.esm.d.ts +760 -0
- package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +4 -1
- package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +3 -1
- package/third_party/source-map-scopes-codec/package/src/codec.d.ts +6 -5
- package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +2 -0
- package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +4 -1
- package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +4 -3
- package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +1 -1
- package/models/trace/lantern/lantern.js +0 -8
- package/models/trace/types/Timing.js +0 -8
- package/models/trace/types/TraceEvents.js +0 -189
- package/models/trace/types/types.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as FormatterActions from '../../entrypoints/formatter_actions/formatter_actions.js';
|
|
2
|
-
export { DefinitionKind, ScopeKind, type ScopeTreeNode } from '../../entrypoints/formatter_actions/formatter_actions.js';
|
|
2
|
+
export { DefinitionKind, ScopeKind, type ScopeTreeNode, type ScopeVariableMapping, } from '../../entrypoints/formatter_actions/formatter_actions.js';
|
|
3
3
|
export declare class FormatterWorkerPool {
|
|
4
4
|
private taskQueue;
|
|
5
5
|
private workerTasks;
|
|
@@ -18,7 +18,7 @@ export declare class FormatterWorkerPool {
|
|
|
18
18
|
private runChunkedTask;
|
|
19
19
|
private runTask;
|
|
20
20
|
format(mimeType: string, content: string, indentString: string): Promise<FormatterActions.FormatResult>;
|
|
21
|
-
javaScriptSubstitute(expression: string, mapping:
|
|
21
|
+
javaScriptSubstitute(expression: string, mapping: FormatterActions.ScopeVariableMapping[]): Promise<string>;
|
|
22
22
|
javaScriptScopeTree(expression: string, sourceType?: 'module' | 'script'): Promise<FormatterActions.ScopeTreeNode | null>;
|
|
23
23
|
parseCSS(content: string, callback: (arg0: boolean, arg1: CSSRule[]) => void): void;
|
|
24
24
|
}
|
|
@@ -3,8 +3,8 @@ export interface FormattedContent {
|
|
|
3
3
|
formattedContent: string;
|
|
4
4
|
formattedMapping: FormatterSourceMapping;
|
|
5
5
|
}
|
|
6
|
-
export declare function format(
|
|
7
|
-
export declare function formatScriptContent(
|
|
6
|
+
export declare function format(contentType: Common.ResourceType.ResourceType, mimeType: string, content: string, indent: string): Promise<FormattedContent>;
|
|
7
|
+
export declare function formatScriptContent(mimeType: string, content: string, indent: string): Promise<FormattedContent>;
|
|
8
8
|
export interface FormatterSourceMapping {
|
|
9
9
|
originalToFormatted(lineNumber: number, columnNumber?: number): number[];
|
|
10
10
|
formattedToOriginal(lineNumber: number, columnNumber?: number): number[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
2
2
|
import type * as Handlers from '../handlers/handlers.js';
|
|
3
3
|
import * as Types from '../types/types.js';
|
|
4
|
-
export declare const stackTraceForEventInTrace:
|
|
4
|
+
export declare const stackTraceForEventInTrace: WeakMap<Handlers.Types.HandlerData, Map<Types.Events.Event, Protocol.Runtime.StackTrace>>;
|
|
5
5
|
export declare function clearCacheForTrace(data: Handlers.Types.HandlerData): void;
|
|
6
6
|
/**
|
|
7
7
|
* This util builds a stack trace that includes async calls for a given
|
|
@@ -2,7 +2,7 @@ import * as Types from '../types/types.js';
|
|
|
2
2
|
import type { HandlerName } from './types.js';
|
|
3
3
|
export interface Data {
|
|
4
4
|
animationFrames: Types.Events.SyntheticAnimationFramePair[];
|
|
5
|
-
presentationForFrame:
|
|
5
|
+
presentationForFrame: WeakMap<Types.Events.SyntheticAnimationFramePair, Types.Events.AnimationFramePresentation>;
|
|
6
6
|
}
|
|
7
7
|
export declare function reset(): void;
|
|
8
8
|
export declare function handleUserConfig(config: Types.Configuration.Configuration): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Types from '../types/types.js';
|
|
2
2
|
declare let schedulerToRunEntryPoints: Map<Types.Events.Event, Types.Events.Event[]>;
|
|
3
|
-
declare let asyncCallToScheduler:
|
|
3
|
+
declare let asyncCallToScheduler: WeakMap<Types.Events.SyntheticProfileCall, {
|
|
4
4
|
taskName: string;
|
|
5
5
|
scheduler: Types.Events.Event;
|
|
6
6
|
}>;
|
|
7
|
-
declare let runEntryPointToScheduler:
|
|
7
|
+
declare let runEntryPointToScheduler: WeakMap<Types.Events.Event, {
|
|
8
8
|
taskName: string;
|
|
9
9
|
scheduler: Types.Events.Event;
|
|
10
10
|
}>;
|
|
@@ -5,9 +5,9 @@ export declare function handleEvent(event: Types.Events.Event): void;
|
|
|
5
5
|
export declare function finalize(options: FinalizeOptions): Promise<void>;
|
|
6
6
|
export interface ImagePaintData {
|
|
7
7
|
paintImageByDrawLazyPixelRef: Map<number, Types.Events.PaintImage>;
|
|
8
|
-
paintImageForEvent:
|
|
8
|
+
paintImageForEvent: WeakMap<Types.Events.Event, Types.Events.PaintImage>;
|
|
9
9
|
paintImageEventForUrl: Map<string, Types.Events.PaintImage[]>;
|
|
10
|
-
paintEventToCorrectedDisplaySize:
|
|
10
|
+
paintEventToCorrectedDisplaySize: WeakMap<Types.Events.PaintImage, {
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
}>;
|
|
@@ -13,8 +13,8 @@ export declare function reset(): void;
|
|
|
13
13
|
export declare function handleEvent(event: Types.Events.Event): void;
|
|
14
14
|
export declare function finalize(): Promise<void>;
|
|
15
15
|
export interface InitiatorsData {
|
|
16
|
-
eventToInitiator:
|
|
17
|
-
initiatorToEvents:
|
|
16
|
+
eventToInitiator: WeakMap<Types.Events.Event, Types.Events.Event>;
|
|
17
|
+
initiatorToEvents: WeakMap<Types.Events.Event, Types.Events.Event[]>;
|
|
18
18
|
}
|
|
19
19
|
export declare function data(): InitiatorsData;
|
|
20
20
|
export declare function deps(): ['Flows', 'AsyncJSCalls'];
|
|
@@ -6,7 +6,7 @@ export declare function finalize(): Promise<void>;
|
|
|
6
6
|
export interface LayerTreeData {
|
|
7
7
|
paints: Types.Events.Paint[];
|
|
8
8
|
snapshots: Types.Events.DisplayItemListSnapshot[];
|
|
9
|
-
paintsToSnapshots:
|
|
9
|
+
paintsToSnapshots: WeakMap<Types.Events.Paint, Types.Events.DisplayItemListSnapshot>;
|
|
10
10
|
}
|
|
11
11
|
export declare function data(): LayerTreeData;
|
|
12
12
|
export declare function deps(): HandlerName[];
|
|
@@ -43,7 +43,7 @@ interface NetworkRequestData {
|
|
|
43
43
|
* This is because backend trace events have some bugs which means the initiators are not always accurate.
|
|
44
44
|
* See crrev.com/c/7032169 for context.
|
|
45
45
|
*/
|
|
46
|
-
incompleteInitiator:
|
|
46
|
+
incompleteInitiator: WeakMap<Types.Events.SyntheticNetworkRequest, Types.Events.SyntheticNetworkRequest>;
|
|
47
47
|
webSocket: WebSocketTraceData[];
|
|
48
48
|
entityMappings: HandlerHelpers.EntityMappings;
|
|
49
49
|
linkPreconnectEvents: Types.Events.LinkPreconnect[];
|
|
@@ -48,7 +48,7 @@ export interface PageLoadMetricsData {
|
|
|
48
48
|
/**
|
|
49
49
|
* MetaCharsetCheck events grouped by navigation.
|
|
50
50
|
*/
|
|
51
|
-
metaCharsetCheckEventsByNavigation:
|
|
51
|
+
metaCharsetCheckEventsByNavigation: WeakMap<AnyNavigationStart, Types.Events.MetaCharsetCheck[]>;
|
|
52
52
|
}
|
|
53
53
|
export declare function data(): PageLoadMetricsData;
|
|
54
54
|
export declare function deps(): HandlerName[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Types from '../types/types.js';
|
|
2
2
|
import type { HandlerName } from './types.js';
|
|
3
3
|
export interface WarningsData {
|
|
4
|
-
perEvent:
|
|
4
|
+
perEvent: WeakMap<Types.Events.Event, Warning[]>;
|
|
5
5
|
perWarning: Map<Warning, Types.Events.Event[]>;
|
|
6
6
|
}
|
|
7
7
|
export type Warning = 'LONG_TASK' | 'IDLE_CALLBACK_OVER_TIME' | 'FORCED_REFLOW' | 'LONG_INTERACTION';
|
|
@@ -50,7 +50,9 @@ export declare class SamplesIntegrator {
|
|
|
50
50
|
static showNativeName(name: string, runtimeCallStatsEnabled: boolean): boolean;
|
|
51
51
|
static nativeGroup(nativeName: string): SamplesIntegrator.NativeGroups | null;
|
|
52
52
|
static isNativeRuntimeFrame(frame: Protocol.Runtime.CallFrame): boolean;
|
|
53
|
-
static filterStackFrames
|
|
53
|
+
static filterStackFrames<T extends {
|
|
54
|
+
callFrame: Protocol.Runtime.CallFrame;
|
|
55
|
+
}>(stack: T[], engineConfig: Types.Configuration.Configuration): void;
|
|
54
56
|
static createFakeTraceFromCpuProfile(profile: Protocol.Profiler.Profile, tid: Types.Events.ThreadID): Types.File.TraceFile;
|
|
55
57
|
static extractCpuProfileFromFakeTrace(traceEvents: readonly Types.Events.Event[]): Protocol.Profiler.Profile;
|
|
56
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
2
2
|
import type * as CPUProfile from '../../cpu_profile/cpu_profile.js';
|
|
3
3
|
import * as Types from '../types/types.js';
|
|
4
|
+
export declare function getEventDataObject(event: Types.Events.Event): Record<string, unknown> | null;
|
|
4
5
|
/**
|
|
5
6
|
* Extracts the raw stack trace in known trace events. Most likely than
|
|
6
7
|
* not you want to use `getZeroIndexedStackTraceForEvent`, which returns
|
|
@@ -89,6 +90,7 @@ export declare function rawCallFrameForEntry(entry: Types.Events.Event): Protoco
|
|
|
89
90
|
*/
|
|
90
91
|
export declare function makeZeroBasedCallFrame(callFrame: Types.Events.CallFrame): Types.Events.CallFrame;
|
|
91
92
|
export declare function frameIDForEvent(event: Types.Events.Event): string | null;
|
|
93
|
+
export declare function navigationIDForEvent(event?: Types.Events.Event): string | undefined;
|
|
92
94
|
export declare function isTopLevelEvent(event: Types.Events.Event): boolean;
|
|
93
95
|
export declare function isExtensionUrl(url: string): boolean;
|
|
94
96
|
export declare function findRecalcStyleEvents(events: Types.Events.Event[], startTime: Types.Timing.Micro, endTime?: Types.Timing.Micro): Types.Events.RecalcStyle[];
|
|
@@ -54,7 +54,7 @@ export declare const UIStrings: {
|
|
|
54
54
|
/**
|
|
55
55
|
* @description Text status when no layout shift culprits or root causes were found.
|
|
56
56
|
*/
|
|
57
|
-
readonly noCulprits: "
|
|
57
|
+
readonly noCulprits: "Couldn’t detect any layout shift culprits";
|
|
58
58
|
};
|
|
59
59
|
export declare const i18nString: i18n.LocalizeString;
|
|
60
60
|
export type CLSCulpritsInsightModel = InsightModel<typeof UIStrings, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
2
2
|
import * as Extras from '../extras/extras.js';
|
|
3
3
|
import type * as Handlers from '../handlers/handlers.js';
|
|
4
|
-
import
|
|
4
|
+
import * as Types from '../types/types.js';
|
|
5
5
|
import { type InsightModel, type InsightSetContext } from './types.js';
|
|
6
6
|
export declare const UIStrings: {
|
|
7
7
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
2
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
2
3
|
import type * as Handlers from '../handlers/handlers.js';
|
|
3
4
|
import type * as Types from '../types/types.js';
|
|
4
5
|
import { type InsightModel, type InsightSetContext } from './types.js';
|
|
@@ -69,6 +69,7 @@ declare class NetworkAnalyzer {
|
|
|
69
69
|
*/
|
|
70
70
|
static estimateResponseTimeByOrigin(records: Lantern.NetworkRequest[], rttByOrigin: Map<string, number>): Map<string, number[]>;
|
|
71
71
|
static canTrustConnectionInformation(requests: Lantern.NetworkRequest[]): boolean;
|
|
72
|
+
static isMultiplexedProtocol(protocol?: string): boolean;
|
|
72
73
|
/**
|
|
73
74
|
* Returns a map of requestId -> connectionReused, estimating the information if the information
|
|
74
75
|
* available in the records themselves appears untrustworthy.
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import type * as Lantern from '../types/types.js';
|
|
2
2
|
import { BaseNode } from './BaseNode.js';
|
|
3
3
|
declare class CPUNode<T = Lantern.AnyNetworkObject> extends BaseNode<T> {
|
|
4
|
+
#private;
|
|
4
5
|
_event: Lantern.TraceEvent;
|
|
5
6
|
_childEvents: Lantern.TraceEvent[];
|
|
6
7
|
correctedEndTs: number | undefined;
|
|
7
|
-
constructor(parentEvent: Lantern.TraceEvent, childEvents?: Lantern.TraceEvent[], correctedEndTs?: number);
|
|
8
|
+
constructor(parentEvent: Lantern.TraceEvent, childEvents?: Lantern.TraceEvent[], correctedEndTs?: number, scriptUrlById?: ReadonlyMap<number, string>);
|
|
8
9
|
get type(): 'cpu';
|
|
9
10
|
get startTime(): number;
|
|
10
11
|
get endTime(): number;
|
|
11
12
|
get duration(): number;
|
|
12
13
|
get event(): Lantern.TraceEvent;
|
|
13
14
|
get childEvents(): Lantern.TraceEvent[];
|
|
15
|
+
getScriptUrlById(scriptId: number): string | undefined;
|
|
14
16
|
/**
|
|
15
17
|
* Returns true if this node contains a Layout task.
|
|
16
18
|
*/
|
|
17
19
|
didPerformLayout(): boolean;
|
|
18
20
|
/**
|
|
19
|
-
* Returns the script URLs that had their EvaluateScript events occur in this task.
|
|
21
|
+
* Returns the script URLs that had their EvaluateScript or v8.evaluateModule events occur in this task.
|
|
20
22
|
*/
|
|
21
23
|
getEvaluateScriptURLs(): Set<string>;
|
|
22
24
|
cloneWithoutRelationships(): CPUNode;
|
|
@@ -15,23 +15,23 @@ interface DownloadResults {
|
|
|
15
15
|
declare class TCPConnection {
|
|
16
16
|
warmed: boolean;
|
|
17
17
|
ssl: boolean;
|
|
18
|
-
|
|
18
|
+
multiplexed: boolean;
|
|
19
19
|
rtt: number;
|
|
20
20
|
throughput: number;
|
|
21
21
|
serverLatency: number;
|
|
22
22
|
_congestionWindow: number;
|
|
23
23
|
h2OverflowBytesDownloaded: number;
|
|
24
|
-
constructor(rtt: number, throughput: number, serverLatency?: number, ssl?: boolean,
|
|
24
|
+
constructor(rtt: number, throughput: number, serverLatency?: number, ssl?: boolean, multiplexed?: boolean);
|
|
25
25
|
static maximumSaturatedConnections(rtt: number, availableThroughput: number): number;
|
|
26
26
|
computeMaximumCongestionWindowInSegments(): number;
|
|
27
27
|
setThroughput(throughput: number): void;
|
|
28
28
|
setCongestionWindow(congestion: number): void;
|
|
29
29
|
setWarmed(warmed: boolean): void;
|
|
30
|
-
|
|
30
|
+
isMultiplexed(): boolean;
|
|
31
31
|
get congestionWindow(): number;
|
|
32
32
|
/**
|
|
33
33
|
* Sets the number of excess bytes that are available to this connection on future downloads, only
|
|
34
|
-
* applies to H2 connections.
|
|
34
|
+
* applies to multiplexed (H2/H3) connections.
|
|
35
35
|
*/
|
|
36
36
|
setH2OverflowBytesDownloaded(bytes: number): void;
|
|
37
37
|
clone(): TCPConnection;
|
|
@@ -27,6 +27,7 @@ export interface TraceEvent {
|
|
|
27
27
|
data?: {
|
|
28
28
|
frame?: string;
|
|
29
29
|
readyState?: number;
|
|
30
|
+
scriptId?: number;
|
|
30
31
|
stackTrace?: Array<{
|
|
31
32
|
url: string;
|
|
32
33
|
}>;
|
|
@@ -43,6 +44,7 @@ export interface Trace {
|
|
|
43
44
|
traceEvents: TraceEvent[];
|
|
44
45
|
}
|
|
45
46
|
export type ResourcePriority = ('VeryLow' | 'Low' | 'Medium' | 'High' | 'VeryHigh');
|
|
47
|
+
export type RenderBlocking = ('blocking' | 'non_blocking' | 'in_body_parser_blocking' | 'potentially_blocking' | 'dynamically_injected_non_blocking');
|
|
46
48
|
export type ResourceType = keyof typeof NetworkRequestTypes;
|
|
47
49
|
type InitiatorType = ('parser' | 'script' | 'preload' | 'SignedExchange' | 'preflight' | 'FedCM' | 'other');
|
|
48
50
|
export type ResourceTiming = Protocol.Network.ResourceTiming;
|
|
@@ -115,6 +117,12 @@ export interface NetworkRequest<T = AnyNetworkObject> {
|
|
|
115
117
|
resourceType?: ResourceType;
|
|
116
118
|
mimeType: string;
|
|
117
119
|
priority: ResourcePriority;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the request is render blocking. Optional because it is not set on
|
|
122
|
+
* Document requests, older traces, or NetworkRequests created from CDP data
|
|
123
|
+
* prior to M145.
|
|
124
|
+
*/
|
|
125
|
+
renderBlocking?: RenderBlocking;
|
|
118
126
|
frameId: string | undefined;
|
|
119
127
|
fromWorker: boolean;
|
|
120
128
|
/**
|
|
@@ -186,6 +194,13 @@ export declare namespace Simulation {
|
|
|
186
194
|
firstContentfulPaint: number;
|
|
187
195
|
largestContentfulPaint?: number;
|
|
188
196
|
};
|
|
197
|
+
largestContentfulPaintEvt?: {
|
|
198
|
+
args: {
|
|
199
|
+
data?: {
|
|
200
|
+
type?: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
189
204
|
}
|
|
190
205
|
interface NodeTiming {
|
|
191
206
|
startTime: number;
|
package/models/trace/trace.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Copyright 2026 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
2
4
|
import {DevTools} from 'chrome-devtools-mcp/build/src/third_party/index.js';
|
|
3
5
|
|
|
4
6
|
// Initialize DevTools 'en-US' locale if not already initialized so Insight models format strings cleanly in Node.
|
|
@@ -16,9 +18,24 @@ try {
|
|
|
16
18
|
DevTools.I18n.i18n.registerLocaleDataForTest('en-US', {});
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
21
|
+
// Temporary workaround for Lighthouse i18n (TASTE.md:77).
|
|
22
|
+
//
|
|
23
|
+
// Why this exists:
|
|
24
|
+
// Lighthouse's multi-locale reporting pipeline needs structured message descriptors
|
|
25
|
+
// {i18nId, values, formattedDefault} so that audit results transferred from worker
|
|
26
|
+
// threads can be re-localized into any target locale (e.g., es, ja) using Lighthouse's
|
|
27
|
+
// translation dictionaries. By default, DevTools formats strings eagerly to primitive strings.
|
|
28
|
+
//
|
|
29
|
+
// Clean upstream solution:
|
|
30
|
+
// Add first-class support in devtools-frontend (front_end/core/i18n/DevToolsLocale.ts)
|
|
31
|
+
// for returning structured message descriptors—either via a configurable mode on
|
|
32
|
+
// DevToolsLocale (e.g., DevToolsLocale.setStructuredMessageMode(true)) or by having
|
|
33
|
+
// LocalizedStringSet expose a getMessageDescriptor(id, values) API that returns
|
|
34
|
+
// {i18nId, values, formattedDefault} with a .toString() fallback.
|
|
35
|
+
//
|
|
36
|
+
// Sunset criteria:
|
|
37
|
+
// Once that upstream DevTools change lands and rolls into chrome-devtools-mcp,
|
|
38
|
+
// delete this monkey-patch and use the native DevTools API.
|
|
22
39
|
{
|
|
23
40
|
const dummySet = DevTools.I18n.i18n.registerUIStrings('', {}).getLocalizedStringSetFor('en-US');
|
|
24
41
|
const proto = Object.getPrototypeOf(dummySet);
|
|
@@ -111,9 +111,10 @@ export interface BottomInfoBar {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
114
|
+
* Marks a flame chart entry that has a comment thread, linked by ID to a
|
|
115
|
+
* CommentThread in CommentManager. The overlay renders an invisible box sized
|
|
116
|
+
* to the entry. The shared comments overlay draws the pin, highlight and popup
|
|
117
|
+
* relative to that box.
|
|
117
118
|
*/
|
|
118
119
|
export interface CommentPin {
|
|
119
120
|
type: 'COMMENT_PIN';
|