@paulirish/trace_engine 0.0.50 → 0.0.51
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/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
- package/core/platform/Constructor.d.ts +2 -2
- package/core/platform/Constructor.js.map +1 -1
- package/core/platform/StringUtilities.d.ts +2 -5
- package/core/platform/StringUtilities.js +0 -3
- package/core/platform/StringUtilities.js.map +1 -1
- package/core/platform/TypescriptUtilities.d.ts +1 -1
- package/core/platform/TypescriptUtilities.js +1 -1
- package/core/platform/TypescriptUtilities.js.map +1 -1
- package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/core/platform/platform-tsconfig.json +2 -3
- package/core/platform/platform.d.ts +1 -2
- package/core/platform/platform.js +1 -2
- package/core/platform/platform.js.map +1 -1
- package/generated/protocol.d.ts +156 -31
- package/locales/af.json +63 -3
- package/locales/am.json +63 -3
- package/locales/ar.json +63 -3
- package/locales/as.json +63 -3
- package/locales/az.json +63 -3
- package/locales/be.json +64 -4
- package/locales/bg.json +62 -2
- package/locales/bn.json +63 -3
- package/locales/bs.json +63 -3
- package/locales/ca.json +62 -2
- package/locales/cs.json +62 -2
- package/locales/cy.json +63 -3
- package/locales/da.json +63 -3
- package/locales/de.json +63 -3
- package/locales/el.json +62 -2
- package/locales/en-GB.json +63 -3
- package/locales/en-US.json +55 -22
- package/locales/en-XL.json +55 -22
- package/locales/es-419.json +63 -3
- package/locales/es.json +64 -4
- package/locales/et.json +64 -4
- package/locales/eu.json +79 -19
- package/locales/fa.json +62 -2
- package/locales/fi.json +63 -3
- package/locales/fil.json +63 -3
- package/locales/fr-CA.json +63 -3
- package/locales/fr.json +63 -3
- package/locales/gl.json +62 -2
- package/locales/gu.json +63 -3
- package/locales/he.json +63 -3
- package/locales/hi.json +62 -2
- package/locales/hr.json +63 -3
- package/locales/hu.json +62 -2
- package/locales/hy.json +63 -3
- package/locales/id.json +62 -2
- package/locales/is.json +64 -4
- package/locales/it.json +64 -4
- package/locales/ja.json +63 -3
- package/locales/ka.json +63 -3
- package/locales/kk.json +62 -2
- package/locales/km.json +62 -2
- package/locales/kn.json +63 -3
- package/locales/ko.json +63 -3
- package/locales/ky.json +63 -3
- package/locales/lo.json +63 -3
- package/locales/lt.json +62 -2
- package/locales/lv.json +62 -2
- package/locales/mk.json +62 -2
- package/locales/ml.json +63 -3
- package/locales/mn.json +63 -3
- package/locales/mr.json +64 -4
- package/locales/ms.json +63 -3
- package/locales/my.json +63 -3
- package/locales/ne.json +64 -4
- package/locales/nl.json +63 -3
- package/locales/no.json +62 -2
- package/locales/or.json +63 -3
- package/locales/pa.json +62 -2
- package/locales/pl.json +62 -2
- package/locales/pt-PT.json +62 -2
- package/locales/pt.json +63 -3
- package/locales/ro.json +63 -3
- package/locales/ru.json +63 -3
- package/locales/si.json +63 -3
- package/locales/sk.json +63 -3
- package/locales/sl.json +62 -2
- package/locales/sq.json +63 -3
- package/locales/sr-Latn.json +62 -2
- package/locales/sr.json +62 -2
- package/locales/sv.json +62 -2
- package/locales/sw.json +63 -3
- package/locales/ta.json +66 -6
- package/locales/te.json +63 -3
- package/locales/th.json +63 -3
- package/locales/tr.json +63 -3
- package/locales/uk.json +63 -3
- package/locales/ur.json +64 -4
- package/locales/uz.json +62 -2
- package/locales/vi.json +62 -2
- package/locales/zh-HK.json +63 -3
- package/locales/zh-TW.json +63 -3
- package/locales/zh.json +62 -2
- package/locales/zu.json +63 -3
- package/models/cpu_profile/CPUProfileDataModel.d.ts +8 -0
- package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
- package/models/cpu_profile/cpu_profile-tsconfig.json +2 -2
- package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/Processor.d.ts +1 -1
- package/models/trace/Processor.js +94 -74
- package/models/trace/Processor.js.map +1 -1
- package/models/trace/TracingManager.js.map +1 -1
- package/models/trace/bundle-tsconfig.json +1 -1
- package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +20 -2
- package/models/trace/extras/ScriptDuplication.d.ts +11 -15
- package/models/trace/extras/ScriptDuplication.js +59 -77
- package/models/trace/extras/ScriptDuplication.js.map +1 -1
- package/models/trace/extras/ThirdParties.d.ts +6 -13
- package/models/trace/extras/ThirdParties.js +69 -133
- package/models/trace/extras/ThirdParties.js.map +1 -1
- package/models/trace/extras/TraceTree.d.ts +15 -3
- package/models/trace/extras/TraceTree.js +36 -8
- package/models/trace/extras/TraceTree.js.map +1 -1
- package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/extras/extras-tsconfig.json +2 -2
- package/models/trace/extras/extras.d.ts +880 -787
- package/models/trace/extras/extras.js +880 -787
- package/models/trace/handlers/AsyncJSCallsHandler.js +36 -4
- package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
- package/models/trace/handlers/InvalidationsHandler.js +1 -0
- package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
- package/models/trace/handlers/ModelHandlers.d.ts +0 -1
- package/models/trace/handlers/ModelHandlers.js +0 -1
- package/models/trace/handlers/ModelHandlers.js.map +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
- package/models/trace/handlers/RendererHandler.d.ts +1 -1
- package/models/trace/handlers/RendererHandler.js +2 -2
- package/models/trace/handlers/RendererHandler.js.map +1 -1
- package/models/trace/handlers/ScreenshotsHandler.js +3 -1
- package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
- package/models/trace/handlers/ScriptsHandler.d.ts +12 -0
- package/models/trace/handlers/ScriptsHandler.js +93 -1
- package/models/trace/handlers/ScriptsHandler.js.map +1 -1
- package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/handlers/handlers-tsconfig.json +2 -3
- package/models/trace/helpers/Network.d.ts +5 -0
- package/models/trace/helpers/Network.js +17 -0
- package/models/trace/helpers/Network.js.map +1 -1
- package/models/trace/helpers/SamplesIntegrator.js +19 -23
- package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
- package/models/trace/helpers/SyntheticEvents.d.ts +0 -1
- package/models/trace/helpers/SyntheticEvents.js +0 -4
- package/models/trace/helpers/SyntheticEvents.js.map +1 -1
- package/models/trace/helpers/Trace.d.ts +2 -1
- package/models/trace/helpers/Trace.js +101 -1
- package/models/trace/helpers/Trace.js.map +1 -1
- package/models/trace/helpers/TreeHelpers.d.ts +2 -5
- package/models/trace/helpers/TreeHelpers.js +0 -4
- package/models/trace/helpers/TreeHelpers.js.map +1 -1
- package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/helpers/helpers-tsconfig.json +2 -2
- package/models/trace/insights/{UseCache.d.ts → Cache.d.ts} +2 -2
- package/models/trace/insights/{UseCache.js → Cache.js} +11 -5
- package/models/trace/insights/Cache.js.map +1 -0
- package/models/trace/insights/Common.d.ts +21 -2
- package/models/trace/insights/Common.js +86 -2
- package/models/trace/insights/Common.js.map +1 -1
- package/models/trace/insights/DocumentLatency.js +2 -8
- package/models/trace/insights/DocumentLatency.js.map +1 -1
- package/models/trace/insights/DuplicatedJavaScript.d.ts +7 -4
- package/models/trace/insights/DuplicatedJavaScript.js +25 -5
- package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
- package/models/trace/insights/ForcedReflow.d.ts +5 -1
- package/models/trace/insights/ForcedReflow.js +6 -2
- package/models/trace/insights/ForcedReflow.js.map +1 -1
- package/models/trace/insights/InteractionToNextPaint.d.ts +1 -0
- package/models/trace/insights/InteractionToNextPaint.js +3 -0
- package/models/trace/insights/InteractionToNextPaint.js.map +1 -1
- package/models/trace/insights/LegacyJavaScript.d.ts +32 -0
- package/models/trace/insights/LegacyJavaScript.js +77 -0
- package/models/trace/insights/LegacyJavaScript.js.map +1 -0
- package/models/trace/insights/Models.d.ts +3 -1
- package/models/trace/insights/Models.js +3 -1
- package/models/trace/insights/Models.js.map +1 -1
- package/models/trace/insights/ModernHTTP.d.ts +51 -0
- package/models/trace/insights/ModernHTTP.js +187 -0
- package/models/trace/insights/ModernHTTP.js.map +1 -0
- package/models/trace/insights/NetworkDependencyTree.js +1 -1
- package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
- package/models/trace/insights/ThirdParties.d.ts +1 -5
- package/models/trace/insights/ThirdParties.js +8 -21
- package/models/trace/insights/ThirdParties.js.map +1 -1
- package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/insights/insights-tsconfig.json +8 -3
- package/models/trace/insights/types.d.ts +1 -0
- package/models/trace/insights/types.js.map +1 -1
- package/models/trace/lantern/core/core-tsconfig.json +2 -2
- package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/graph/graph-tsconfig.json +2 -2
- package/models/trace/lantern/lantern-tsconfig.json +2 -2
- package/models/trace/lantern/metrics/Metric.d.ts +4 -4
- package/models/trace/lantern/metrics/Metric.js +4 -6
- package/models/trace/lantern/metrics/Metric.js.map +1 -1
- package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/metrics/metrics-tsconfig.json +2 -2
- package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/simulation/simulation-tsconfig.json +2 -2
- package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/types/types-tsconfig.json +2 -2
- package/models/trace/trace-tsconfig.json +2 -2
- package/models/trace/types/Configuration.d.ts +2 -0
- package/models/trace/types/Configuration.js.map +1 -1
- package/models/trace/types/TraceEvents.d.ts +28 -50
- package/models/trace/types/TraceEvents.js +8 -23
- package/models/trace/types/TraceEvents.js.map +1 -1
- package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/types/types-tsconfig.json +2 -2
- package/package.json +3 -2
- package/test/test-trace-engine.mjs +19 -17
- package/third_party/legacy-javascript/legacy-javascript.d.ts +1 -0
- package/third_party/legacy-javascript/legacy-javascript.js +1 -0
- package/core/platform/ServerTiming.d.ts +0 -31
- package/core/platform/ServerTiming.js +0 -212
- package/core/platform/ServerTiming.js.map +0 -1
- package/models/trace/handlers/ServerTimingsHandler.d.ts +0 -9
- package/models/trace/handlers/ServerTimingsHandler.js +0 -106
- package/models/trace/handlers/ServerTimingsHandler.js.map +0 -1
- package/models/trace/insights/UseCache.js.map +0 -1
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/graph",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -35,8 +36,7 @@
|
|
|
35
36
|
"../../../../../../../../front_end/models/trace/lantern/graph/PageDependencyGraph.ts",
|
|
36
37
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
37
38
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
38
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
39
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
39
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
40
40
|
],
|
|
41
41
|
"references": [
|
|
42
42
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../front_end/models/trace/lantern",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -31,8 +32,7 @@
|
|
|
31
32
|
"files": [
|
|
32
33
|
"../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
33
34
|
"../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
34
|
-
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
35
|
-
"../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
35
|
+
"../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"references": [
|
|
38
38
|
{
|
|
@@ -35,10 +35,10 @@ declare class Metric {
|
|
|
35
35
|
* from the simulator. In this case, we need to adjust the coefficients as the target throttling
|
|
36
36
|
* settings change.
|
|
37
37
|
*/
|
|
38
|
-
static getScaledCoefficients(
|
|
39
|
-
static getOptimisticGraph(
|
|
40
|
-
static getPessimisticGraph(
|
|
41
|
-
static getEstimateFromSimulation(simulationResult: Simulation.Result,
|
|
38
|
+
static getScaledCoefficients(_rttMs: number): MetricCoefficients;
|
|
39
|
+
static getOptimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node;
|
|
40
|
+
static getPessimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node;
|
|
41
|
+
static getEstimateFromSimulation(simulationResult: Simulation.Result, _extras: Extras): Simulation.Result;
|
|
42
42
|
static compute(data: MetricComputationDataInput, extras?: Omit<Extras, 'optimistic'>): MetricResult;
|
|
43
43
|
}
|
|
44
44
|
export { Metric };
|
|
@@ -22,26 +22,24 @@ class Metric {
|
|
|
22
22
|
static get coefficients() {
|
|
23
23
|
throw new Core.LanternError('coefficients unimplemented!');
|
|
24
24
|
}
|
|
25
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
26
25
|
/**
|
|
27
26
|
* Returns the coefficients, scaled by the throttling settings if needed by the metric.
|
|
28
27
|
* Some lantern metrics (speed-index) use components in their estimate that are not
|
|
29
28
|
* from the simulator. In this case, we need to adjust the coefficients as the target throttling
|
|
30
29
|
* settings change.
|
|
31
30
|
*/
|
|
32
|
-
static getScaledCoefficients(
|
|
31
|
+
static getScaledCoefficients(_rttMs) {
|
|
33
32
|
return this.coefficients;
|
|
34
33
|
}
|
|
35
|
-
static getOptimisticGraph(
|
|
34
|
+
static getOptimisticGraph(_dependencyGraph, _processedNavigation) {
|
|
36
35
|
throw new Core.LanternError('Optimistic graph unimplemented!');
|
|
37
36
|
}
|
|
38
|
-
static getPessimisticGraph(
|
|
37
|
+
static getPessimisticGraph(_dependencyGraph, _processedNavigation) {
|
|
39
38
|
throw new Core.LanternError('Pessmistic graph unimplemented!');
|
|
40
39
|
}
|
|
41
|
-
static getEstimateFromSimulation(simulationResult,
|
|
40
|
+
static getEstimateFromSimulation(simulationResult, _extras) {
|
|
42
41
|
return simulationResult;
|
|
43
42
|
}
|
|
44
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
45
43
|
static compute(data, extras) {
|
|
46
44
|
const { simulator, graph, processedNavigation } = data;
|
|
47
45
|
const metricName = this.name.replace('Lantern', '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../../../../../../front_end/models/trace/lantern/metrics/Metric.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAiC3C,MAAM,MAAM;IACV,MAAM,CAAC,aAAa,CAAC,eAA2B,EAAE,yBAAgE;QAEhH,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;QAErC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBAC/C,OAAO;YACT,CAAC;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;gBAC3C,OAAO;YACT,CAAC;YACD,IAAI,yBAAyB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,YAAY;QACrB,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../../../../../../front_end/models/trace/lantern/metrics/Metric.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Core from '../core/core.js';\nimport * as Graph from '../graph/graph.js';\nimport type * as Simulation from '../simulation/simulation.js';\nimport type * as Types from '../types/types.js';\n\nexport interface MetricComputationDataInput {\n simulator: Simulation.Simulator;\n graph: Graph.Node<unknown>;\n processedNavigation: Types.Simulation.ProcessedNavigation;\n}\n\nexport interface MetricCoefficients {\n intercept: number;\n optimistic: number;\n pessimistic: number;\n}\n\nexport interface MetricResult<T = Types.AnyNetworkObject> {\n timing: number;\n timestamp?: never;\n optimisticEstimate: Simulation.Result<T>;\n pessimisticEstimate: Simulation.Result<T>;\n optimisticGraph: Graph.Node<T>;\n pessimisticGraph: Graph.Node;\n}\n\nexport interface Extras {\n optimistic: boolean;\n fcpResult?: MetricResult;\n lcpResult?: MetricResult;\n interactiveResult?: MetricResult;\n observedSpeedIndex?: number;\n}\n\nclass Metric {\n static getScriptUrls(dependencyGraph: Graph.Node, treatNodeAsRenderBlocking?: (node: Graph.NetworkNode) => boolean):\n Set<string> {\n const scriptUrls = new Set<string>();\n\n dependencyGraph.traverse(node => {\n if (node.type !== Graph.BaseNode.types.NETWORK) {\n return;\n }\n if (node.request.resourceType !== 'Script') {\n return;\n }\n if (treatNodeAsRenderBlocking?.(node)) {\n scriptUrls.add(node.request.url);\n }\n });\n\n return scriptUrls;\n }\n\n static get coefficients(): MetricCoefficients {\n throw new Core.LanternError('coefficients unimplemented!');\n }\n\n /**\n * Returns the coefficients, scaled by the throttling settings if needed by the metric.\n * Some lantern metrics (speed-index) use components in their estimate that are not\n * from the simulator. In this case, we need to adjust the coefficients as the target throttling\n * settings change.\n */\n static getScaledCoefficients(_rttMs: number): MetricCoefficients {\n return this.coefficients;\n }\n\n static getOptimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation):\n Graph.Node {\n throw new Core.LanternError('Optimistic graph unimplemented!');\n }\n\n static getPessimisticGraph(_dependencyGraph: Graph.Node, _processedNavigation: Types.Simulation.ProcessedNavigation):\n Graph.Node {\n throw new Core.LanternError('Pessmistic graph unimplemented!');\n }\n\n static getEstimateFromSimulation(simulationResult: Simulation.Result, _extras: Extras): Simulation.Result {\n return simulationResult;\n }\n\n static compute(data: MetricComputationDataInput, extras?: Omit<Extras, 'optimistic'>): MetricResult {\n const {simulator, graph, processedNavigation} = data;\n\n const metricName = this.name.replace('Lantern', '');\n const optimisticGraph = this.getOptimisticGraph(graph, processedNavigation);\n const pessimisticGraph = this.getPessimisticGraph(graph, processedNavigation);\n\n let simulateOptions = {label: `optimistic${metricName}`};\n const optimisticSimulation = simulator.simulate(optimisticGraph, simulateOptions);\n\n simulateOptions = {label: `pessimistic${metricName}`};\n const pessimisticSimulation = simulator.simulate(pessimisticGraph, simulateOptions);\n\n const optimisticEstimate = this.getEstimateFromSimulation(\n optimisticSimulation,\n {...extras, optimistic: true},\n );\n\n const pessimisticEstimate = this.getEstimateFromSimulation(\n pessimisticSimulation,\n {...extras, optimistic: false},\n );\n\n const coefficients = this.getScaledCoefficients(simulator.rtt);\n // Estimates under 1s don't really follow the normal curve fit, minimize the impact of the intercept\n const interceptMultiplier = coefficients.intercept > 0 ? Math.min(1, optimisticEstimate.timeInMs / 1000) : 1;\n const timing = coefficients.intercept * interceptMultiplier +\n coefficients.optimistic * optimisticEstimate.timeInMs + coefficients.pessimistic * pessimisticEstimate.timeInMs;\n\n return {\n timing,\n optimisticEstimate,\n pessimisticEstimate,\n optimisticGraph,\n pessimisticGraph,\n };\n }\n}\n\nexport {Metric};\n"]}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/metrics",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/metrics/metrics.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/metrics",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -39,8 +40,7 @@
|
|
|
39
40
|
"../../../../../../../../front_end/models/trace/lantern/metrics/TotalBlockingTime.ts",
|
|
40
41
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
41
42
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
42
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
43
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
43
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
44
44
|
],
|
|
45
45
|
"references": [
|
|
46
46
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/simulation",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/simulation/simulation.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/simulation",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -37,8 +38,7 @@
|
|
|
37
38
|
"../../../../../../../../front_end/models/trace/lantern/simulation/TCPConnection.ts",
|
|
38
39
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
39
40
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
40
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
41
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
41
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
42
42
|
],
|
|
43
43
|
"references": [
|
|
44
44
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/types",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/types/types.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../../../front_end/models/trace/lantern/types",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -32,8 +33,7 @@
|
|
|
32
33
|
"../../../../../../../../front_end/models/trace/lantern/types/Lantern.ts",
|
|
33
34
|
"../../../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
34
35
|
"../../../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
35
|
-
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
36
|
-
"../../../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
36
|
+
"../../../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"references": [
|
|
39
39
|
{
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"noImplicitOverride": true,
|
|
19
19
|
"noImplicitReturns": true,
|
|
20
20
|
"noUnusedLocals": false,
|
|
21
|
+
"noUnusedParameters": true,
|
|
21
22
|
"outDir": ".",
|
|
22
23
|
"rootDir": "../../../../../../front_end/models/trace",
|
|
23
24
|
"skipLibCheck": true,
|
|
@@ -35,8 +36,7 @@
|
|
|
35
36
|
"../../../../../../front_end/models/trace/TracingManager.ts",
|
|
36
37
|
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
37
38
|
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
38
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
39
|
-
"../../../../../../node_modules/@types/wicg-task-scheduling/index.d.ts"
|
|
39
|
+
"../../../../../../node_modules/@types/filesystem/index.d.ts"
|
|
40
40
|
],
|
|
41
41
|
"references": [
|
|
42
42
|
{
|
|
@@ -65,4 +65,6 @@ export interface ResolveSourceMapParams {
|
|
|
65
65
|
scriptUrl: Platform.DevToolsPath.UrlString;
|
|
66
66
|
sourceMapUrl: Platform.DevToolsPath.UrlString;
|
|
67
67
|
frame: Protocol.Page.FrameId;
|
|
68
|
+
/** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */
|
|
69
|
+
cachedRawSourceMap?: any;
|
|
68
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Configuration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAwC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAkB,EAAE,CAAC,CAAC;IAC5C,uBAAuB,EAAE,KAAK;IAC9B,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,KAAK;IAChB,6BAA6B,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as Lantern from '../lantern/lantern.js';\n\nimport type * as File from './File.js';\n\nexport interface Configuration {\n /**\n * Include V8 RCS functions in the JS stacks\n */\n includeRuntimeCallStats: boolean;\n /**\n * Show all events: disable the default filtering which hides and excludes some events.\n */\n showAllEvents: boolean;\n /**\n * Extra detail for RPP developers (eg Trace Event json in Summary, and individual JS Sample events)\n */\n debugMode: boolean;\n /**\n * How many invalidation events will be stored for a layout (or similar) event.\n * On large sites with a lot of DOM there can be thousands of invalidations\n * associated with any given event. It is not useful to show the user 1000s of\n * invalidations in the UI, but it is also expensive for us to hold onto them\n * all, and it helps prevents OOM issues when running in NodeJS\n * [https://github.com/GoogleChrome/lighthouse/issues/16111].\n * Therefore, instead, we store only the latest 20 per event. We do also store\n * the total count, so we can show that, but we'll only ever hold on to the\n * last 20 invalidations (in DESC trace order - so the latest 20 in the trace file)\n *\n * If you set this to 0, we will skip the Invalidations processing entirely.\n * 0 effectively disables the InvalidationsHandler and it will not even\n * attempt to gather or track invalidations.\n */\n maxInvalidationEventsPerEvent: number;\n}\n\nexport const defaults = (): Configuration => ({\n includeRuntimeCallStats: false,\n showAllEvents: false,\n debugMode: false,\n maxInvalidationEventsPerEvent: 20,\n});\n\n/**\n * Generates a key that can be used to represent this config in a cache. This is\n * used mainly in tests, where we want to avoid re-parsing a file if we have\n * already processed it with the same configuration.\n */\nexport function configToCacheKey(config: Configuration): string {\n return JSON.stringify(config);\n}\n\nexport interface ParseOptions {\n /**\n * If the trace was just recorded on the current page, rather than an imported file.\n * TODO(paulirish): Maybe remove. This is currently unused by the Processor and Handlers\n * @default false\n */\n isFreshRecording?: boolean;\n /**\n * If the trace is a CPU Profile rather than a Chrome tracing trace.\n * @default false\n */\n isCPUProfile?: boolean;\n metadata?: File.MetaData;\n resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap|null>;\n logger?: {\n start: (id: string) => void,\n end: (id: string) => void,\n };\n lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;\n}\n\nexport interface ResolveSourceMapParams {\n scriptId: string;\n scriptUrl: Platform.DevToolsPath.UrlString;\n sourceMapUrl: Platform.DevToolsPath.UrlString;\n frame: Protocol.Page.FrameId;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Configuration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAwC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAkB,EAAE,CAAC,CAAC;IAC5C,uBAAuB,EAAE,KAAK;IAC9B,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,KAAK;IAChB,6BAA6B,EAAE,EAAE;CAClC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as Lantern from '../lantern/lantern.js';\n\nimport type * as File from './File.js';\n\nexport interface Configuration {\n /**\n * Include V8 RCS functions in the JS stacks\n */\n includeRuntimeCallStats: boolean;\n /**\n * Show all events: disable the default filtering which hides and excludes some events.\n */\n showAllEvents: boolean;\n /**\n * Extra detail for RPP developers (eg Trace Event json in Summary, and individual JS Sample events)\n */\n debugMode: boolean;\n /**\n * How many invalidation events will be stored for a layout (or similar) event.\n * On large sites with a lot of DOM there can be thousands of invalidations\n * associated with any given event. It is not useful to show the user 1000s of\n * invalidations in the UI, but it is also expensive for us to hold onto them\n * all, and it helps prevents OOM issues when running in NodeJS\n * [https://github.com/GoogleChrome/lighthouse/issues/16111].\n * Therefore, instead, we store only the latest 20 per event. We do also store\n * the total count, so we can show that, but we'll only ever hold on to the\n * last 20 invalidations (in DESC trace order - so the latest 20 in the trace file)\n *\n * If you set this to 0, we will skip the Invalidations processing entirely.\n * 0 effectively disables the InvalidationsHandler and it will not even\n * attempt to gather or track invalidations.\n */\n maxInvalidationEventsPerEvent: number;\n}\n\nexport const defaults = (): Configuration => ({\n includeRuntimeCallStats: false,\n showAllEvents: false,\n debugMode: false,\n maxInvalidationEventsPerEvent: 20,\n});\n\n/**\n * Generates a key that can be used to represent this config in a cache. This is\n * used mainly in tests, where we want to avoid re-parsing a file if we have\n * already processed it with the same configuration.\n */\nexport function configToCacheKey(config: Configuration): string {\n return JSON.stringify(config);\n}\n\nexport interface ParseOptions {\n /**\n * If the trace was just recorded on the current page, rather than an imported file.\n * TODO(paulirish): Maybe remove. This is currently unused by the Processor and Handlers\n * @default false\n */\n isFreshRecording?: boolean;\n /**\n * If the trace is a CPU Profile rather than a Chrome tracing trace.\n * @default false\n */\n isCPUProfile?: boolean;\n metadata?: File.MetaData;\n resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap|null>;\n logger?: {\n start: (id: string) => void,\n end: (id: string) => void,\n };\n lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;\n}\n\nexport interface ResolveSourceMapParams {\n scriptId: string;\n scriptUrl: Platform.DevToolsPath.UrlString;\n sourceMapUrl: Platform.DevToolsPath.UrlString;\n frame: Protocol.Page.FrameId;\n /** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */\n cachedRawSourceMap?: SDK.SourceMap.SourceMapV3;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
1
2
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
2
3
|
import type { Micro, Milli, Seconds, TraceWindowMicro } from './Timing.js';
|
|
3
4
|
export declare const enum Phase {
|
|
@@ -312,7 +313,6 @@ export interface SyntheticNetworkRequest extends Complete, SyntheticBased<Phase.
|
|
|
312
313
|
initiator?: Initiator;
|
|
313
314
|
requestMethod?: string;
|
|
314
315
|
timing?: ResourceReceiveResponseTimingData;
|
|
315
|
-
syntheticServerTimings?: SyntheticServerTiming[];
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
318
|
cat: 'loading';
|
|
@@ -1131,7 +1131,7 @@ export interface ConsoleTimeEnd extends PairableAsyncEnd {
|
|
|
1131
1131
|
export type ConsoleTime = ConsoleTimeBegin | ConsoleTimeEnd;
|
|
1132
1132
|
export interface ConsoleTimeStamp extends Event {
|
|
1133
1133
|
cat: 'devtools.timeline';
|
|
1134
|
-
name: Name.
|
|
1134
|
+
name: Name.TIME_STAMP;
|
|
1135
1135
|
ph: Phase.INSTANT;
|
|
1136
1136
|
args: Args & {
|
|
1137
1137
|
data?: ArgsData & {
|
|
@@ -1237,14 +1237,18 @@ declare const enum FrameType {
|
|
|
1237
1237
|
FORKED = "FORKED",
|
|
1238
1238
|
BACKFILL = "BACKFILL"
|
|
1239
1239
|
}
|
|
1240
|
+
export interface OldChromeFrameReporterArgs {
|
|
1241
|
+
chrome_frame_reporter: ChromeFrameReporter;
|
|
1242
|
+
}
|
|
1243
|
+
export interface NewChromeFrameReporterArgs {
|
|
1244
|
+
frame_reporter: ChromeFrameReporter;
|
|
1245
|
+
}
|
|
1240
1246
|
export interface PipelineReporter extends Event {
|
|
1241
1247
|
id2?: {
|
|
1242
1248
|
local?: string;
|
|
1243
1249
|
};
|
|
1244
1250
|
ph: Phase.ASYNC_NESTABLE_START | Phase.ASYNC_NESTABLE_END;
|
|
1245
|
-
args: Args &
|
|
1246
|
-
chrome_frame_reporter: ChromeFrameReporter;
|
|
1247
|
-
};
|
|
1251
|
+
args: Args & (OldChromeFrameReporterArgs | NewChromeFrameReporterArgs);
|
|
1248
1252
|
}
|
|
1249
1253
|
export declare function isPipelineReporter(event: Event): event is PipelineReporter;
|
|
1250
1254
|
export interface SyntheticBased<Ph extends Phase = Phase, T extends Event = Event> extends Event {
|
|
@@ -1305,25 +1309,6 @@ export interface SyntheticProfileCall extends Event {
|
|
|
1305
1309
|
sampleIndex: number;
|
|
1306
1310
|
profileId: ProfileID;
|
|
1307
1311
|
}
|
|
1308
|
-
/**
|
|
1309
|
-
* A synthetic event created from the Server-Timing header of network
|
|
1310
|
-
* request. In order to create these synthetic events, the corresponding
|
|
1311
|
-
* metric (timing) in the header must contain a "start" param, which
|
|
1312
|
-
* corresponds to the timestamp of the metric in the server. The
|
|
1313
|
-
* ServerTimingsHandler implements a heuristic to estimate the offset
|
|
1314
|
-
* between the client clock and the server clock so that the server
|
|
1315
|
-
* timestamp can be translated to the tracing clock.
|
|
1316
|
-
*/
|
|
1317
|
-
export interface SyntheticServerTiming<T extends Phase = Phase.COMPLETE> extends SyntheticBased<T> {
|
|
1318
|
-
rawSourceEvent: ResourceSendRequest;
|
|
1319
|
-
cat: 'devtools.server-timing';
|
|
1320
|
-
args: Args & {
|
|
1321
|
-
data: ArgsData & {
|
|
1322
|
-
desc?: string;
|
|
1323
|
-
origin: string;
|
|
1324
|
-
};
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
1312
|
/**
|
|
1328
1313
|
* A JS Sample reflects a single sample from the V8 CPU Profile
|
|
1329
1314
|
*/
|
|
@@ -1531,35 +1516,17 @@ export interface DebuggerAsyncTaskRun extends Event {
|
|
|
1531
1516
|
name: Name.DEBUGGER_ASYNC_TASK_RUN;
|
|
1532
1517
|
}
|
|
1533
1518
|
export declare function isDebuggerAsyncTaskRun(event: Event): event is DebuggerAsyncTaskRun;
|
|
1534
|
-
|
|
1535
|
-
#private;
|
|
1536
|
-
}
|
|
1537
|
-
export type ProfileID = string & ProfileIdTag;
|
|
1519
|
+
export type ProfileID = Platform.Brand.Brand<string, 'profileIdTag'>;
|
|
1538
1520
|
export declare function ProfileID(value: string): ProfileID;
|
|
1539
|
-
|
|
1540
|
-
#private;
|
|
1541
|
-
}
|
|
1542
|
-
export type CallFrameID = number & CallFrameIdTag;
|
|
1521
|
+
export type CallFrameID = Platform.Brand.Brand<number, 'callFrameIdTag'>;
|
|
1543
1522
|
export declare function CallFrameID(value: number): CallFrameID;
|
|
1544
|
-
|
|
1545
|
-
#private;
|
|
1546
|
-
}
|
|
1547
|
-
export type SampleIndex = number & SampleIndexTag;
|
|
1523
|
+
export type SampleIndex = Platform.Brand.Brand<number, 'sampleIndexTag'>;
|
|
1548
1524
|
export declare function SampleIndex(value: number): SampleIndex;
|
|
1549
|
-
|
|
1550
|
-
#private;
|
|
1551
|
-
}
|
|
1552
|
-
export type ProcessID = number & ProcessIdTag;
|
|
1525
|
+
export type ProcessID = Platform.Brand.Brand<number, 'processIdTag'>;
|
|
1553
1526
|
export declare function ProcessID(value: number): ProcessID;
|
|
1554
|
-
|
|
1555
|
-
#private;
|
|
1556
|
-
}
|
|
1557
|
-
export type ThreadID = number & ThreadIdTag;
|
|
1527
|
+
export type ThreadID = Platform.Brand.Brand<number, 'threadIdTag'>;
|
|
1558
1528
|
export declare function ThreadID(value: number): ThreadID;
|
|
1559
|
-
|
|
1560
|
-
#private;
|
|
1561
|
-
}
|
|
1562
|
-
export type WorkerId = string & WorkerIdTag;
|
|
1529
|
+
export type WorkerId = Platform.Brand.Brand<string, 'workerIdTag'>;
|
|
1563
1530
|
export declare function WorkerId(value: string): WorkerId;
|
|
1564
1531
|
export declare function isComplete(event: Event): event is Complete;
|
|
1565
1532
|
export declare function isBegin(event: Event): event is Begin;
|
|
@@ -1950,7 +1917,6 @@ export interface FunctionCall extends Complete {
|
|
|
1950
1917
|
};
|
|
1951
1918
|
}
|
|
1952
1919
|
export declare function isFunctionCall(event: Event): event is FunctionCall;
|
|
1953
|
-
export declare function isSyntheticServerTiming(event: Event): event is SyntheticServerTiming;
|
|
1954
1920
|
export interface SchedulePostTaskCallback extends Instant {
|
|
1955
1921
|
name: Name.SCHEDULE_POST_TASK_CALLBACK;
|
|
1956
1922
|
args: Args & {
|
|
@@ -2135,7 +2101,7 @@ export declare const enum Name {
|
|
|
2135
2101
|
CONSOLE_TIME = "ConsoleTime",
|
|
2136
2102
|
USER_TIMING = "UserTiming",
|
|
2137
2103
|
INTERACTIVE_TIME = "InteractiveTime",
|
|
2138
|
-
|
|
2104
|
+
TIME_STAMP = "TimeStamp",
|
|
2139
2105
|
BEGIN_FRAME = "BeginFrame",
|
|
2140
2106
|
NEEDS_BEGIN_FRAME_CHANGED = "NeedsBeginFrameChanged",
|
|
2141
2107
|
BEGIN_MAIN_THREAD_FRAME = "BeginMainThreadFrame",
|
|
@@ -2298,4 +2264,16 @@ export interface V8SourceRundownSourcesLargeScriptCatchupEvent extends Event {
|
|
|
2298
2264
|
};
|
|
2299
2265
|
}
|
|
2300
2266
|
export declare function isV8SourceRundownSourcesLargeScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesLargeScriptCatchupEvent;
|
|
2267
|
+
export interface V8SourceRundownSourcesStubScriptCatchupEvent extends Event {
|
|
2268
|
+
cat: 'disabled-by-default-devtools.v8-source-rundown-sources';
|
|
2269
|
+
name: 'StubScriptCatchup';
|
|
2270
|
+
args: Args & {
|
|
2271
|
+
data: {
|
|
2272
|
+
isolate: string;
|
|
2273
|
+
scriptId: number;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
export declare function isV8SourceRundownSourcesStubScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesStubScriptCatchupEvent;
|
|
2278
|
+
export declare function isAnyScriptCatchupEvent(event: Event): event is V8SourceRundownSourcesScriptCatchupEvent | V8SourceRundownSourcesLargeScriptCatchupEvent | V8SourceRundownSourcesStubScriptCatchupEvent;
|
|
2301
2279
|
export {};
|
|
@@ -183,39 +183,21 @@ export function isDebuggerAsyncTaskScheduled(event) {
|
|
|
183
183
|
export function isDebuggerAsyncTaskRun(event) {
|
|
184
184
|
return event.name === "v8::Debugger::AsyncTaskRun" /* Name.DEBUGGER_ASYNC_TASK_RUN */;
|
|
185
185
|
}
|
|
186
|
-
class ProfileIdTag {
|
|
187
|
-
#profileIdTag;
|
|
188
|
-
}
|
|
189
186
|
export function ProfileID(value) {
|
|
190
187
|
return value;
|
|
191
188
|
}
|
|
192
|
-
class CallFrameIdTag {
|
|
193
|
-
#callFrameIdTag;
|
|
194
|
-
}
|
|
195
189
|
export function CallFrameID(value) {
|
|
196
190
|
return value;
|
|
197
191
|
}
|
|
198
|
-
class SampleIndexTag {
|
|
199
|
-
#sampleIndexTag;
|
|
200
|
-
}
|
|
201
192
|
export function SampleIndex(value) {
|
|
202
193
|
return value;
|
|
203
194
|
}
|
|
204
|
-
class ProcessIdTag {
|
|
205
|
-
#processIdTag;
|
|
206
|
-
}
|
|
207
195
|
export function ProcessID(value) {
|
|
208
196
|
return value;
|
|
209
197
|
}
|
|
210
|
-
class ThreadIdTag {
|
|
211
|
-
#threadIdTag;
|
|
212
|
-
}
|
|
213
198
|
export function ThreadID(value) {
|
|
214
199
|
return value;
|
|
215
200
|
}
|
|
216
|
-
class WorkerIdTag {
|
|
217
|
-
#workerIdTag;
|
|
218
|
-
}
|
|
219
201
|
export function WorkerId(value) {
|
|
220
202
|
return value;
|
|
221
203
|
}
|
|
@@ -268,7 +250,7 @@ export function isCommitLoad(event) {
|
|
|
268
250
|
return event.name === 'CommitLoad';
|
|
269
251
|
}
|
|
270
252
|
export function isAnimation(event) {
|
|
271
|
-
// We've found some rare traces with an
|
|
253
|
+
// We've found some rare traces with an Animation trace event from a different category: https://crbug.com/1472375#comment7
|
|
272
254
|
return event.name === 'Animation' && event.cat.includes('devtools.timeline');
|
|
273
255
|
}
|
|
274
256
|
export function isSyntheticAnimation(event) {
|
|
@@ -425,7 +407,7 @@ export function isConsoleTime(event) {
|
|
|
425
407
|
return event.cat === 'blink.console' && isPhaseAsync(event.ph);
|
|
426
408
|
}
|
|
427
409
|
export function isConsoleTimeStamp(event) {
|
|
428
|
-
return event.ph === "I" /* Phase.INSTANT */ && event.name === "TimeStamp" /* Name.
|
|
410
|
+
return event.ph === "I" /* Phase.INSTANT */ && event.name === "TimeStamp" /* Name.TIME_STAMP */;
|
|
429
411
|
}
|
|
430
412
|
export function isUserTimingMeasure(event) {
|
|
431
413
|
return event.name === "UserTiming::Measure" /* Name.USER_TIMING_MEASURE */;
|
|
@@ -515,9 +497,6 @@ export function isV8Compile(event) {
|
|
|
515
497
|
export function isFunctionCall(event) {
|
|
516
498
|
return event.name === "FunctionCall" /* Name.FUNCTION_CALL */;
|
|
517
499
|
}
|
|
518
|
-
export function isSyntheticServerTiming(event) {
|
|
519
|
-
return event.cat === 'devtools.server-timing';
|
|
520
|
-
}
|
|
521
500
|
export function isSchedulePostTaskCallback(event) {
|
|
522
501
|
return event.name === "SchedulePostTaskCallback" /* Name.SCHEDULE_POST_TASK_CALLBACK */;
|
|
523
502
|
}
|
|
@@ -582,4 +561,10 @@ export function isV8SourceRundownSourcesScriptCatchupEvent(event) {
|
|
|
582
561
|
export function isV8SourceRundownSourcesLargeScriptCatchupEvent(event) {
|
|
583
562
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'LargeScriptCatchup';
|
|
584
563
|
}
|
|
564
|
+
export function isV8SourceRundownSourcesStubScriptCatchupEvent(event) {
|
|
565
|
+
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources' && event.name === 'StubScriptCatchup';
|
|
566
|
+
}
|
|
567
|
+
export function isAnyScriptCatchupEvent(event) {
|
|
568
|
+
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources';
|
|
569
|
+
}
|
|
585
570
|
//# sourceMappingURL=TraceEvents.js.map
|