@paulirish/trace_engine 0.0.60 → 0.0.62
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/analyze-trace.d.mts.map +1 -1
- package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
- package/analyze-inspector-issues.mjs +1 -1
- package/analyze-trace.mjs +1 -2
- package/core/platform/ArrayUtilities.d.ts +2 -0
- package/core/platform/ArrayUtilities.js +11 -1
- package/core/platform/ArrayUtilities.js.map +1 -1
- package/core/platform/HostRuntime.d.ts +4 -0
- package/core/platform/HostRuntime.js +25 -0
- package/core/platform/HostRuntime.js.map +1 -0
- package/core/platform/KeyboardUtilities.d.ts +6 -2
- package/core/platform/KeyboardUtilities.js.map +1 -1
- package/core/platform/StringUtilities.d.ts +2 -0
- package/core/platform/StringUtilities.js +64 -13
- package/core/platform/StringUtilities.js.map +1 -1
- package/core/platform/api/HostRuntime.d.ts +36 -0
- package/core/platform/api/HostRuntime.js +5 -0
- package/core/platform/api/HostRuntime.js.map +1 -0
- package/core/platform/api/api-tsconfig.json +43 -0
- package/core/platform/api/api.d.ts +2 -0
- package/core/platform/api/api.js +6 -0
- package/core/platform/api/api.js.map +1 -0
- package/core/platform/api/api_node_typecheck-tsconfig.json +48 -0
- package/core/platform/api/bundle-tsconfig.json +1 -0
- package/core/platform/api/devtools_entrypoint-bundle-typescript-tsconfig.json +48 -0
- package/core/platform/browser/HostRuntime.d.ts +2 -0
- package/core/platform/browser/HostRuntime.js +64 -0
- package/core/platform/browser/HostRuntime.js.map +1 -0
- package/core/platform/browser/browser-tsconfig.json +48 -0
- package/core/platform/browser/browser.d.ts +2 -0
- package/core/platform/browser/browser.js +6 -0
- package/core/platform/browser/browser.js.map +1 -0
- package/core/platform/browser/bundle-tsconfig.json +1 -0
- package/core/platform/browser/devtools_entrypoint-bundle-typescript-tsconfig.json +48 -0
- package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/core/platform/node/HostRuntime.d.ts +2 -0
- package/core/platform/node/HostRuntime.js +73 -0
- package/core/platform/node/HostRuntime.js.map +1 -0
- package/core/platform/node/bundle-tsconfig.json +1 -0
- package/core/platform/node/devtools_entrypoint-bundle-typescript-tsconfig.json +48 -0
- package/core/platform/node/node-tsconfig.json +52 -0
- package/core/platform/node/node.d.ts +2 -0
- package/core/platform/node/node.js +6 -0
- package/core/platform/node/node.js.map +1 -0
- package/core/platform/platform-tsconfig.json +17 -5
- package/core/platform/platform.d.ts +2 -2
- package/core/platform/platform.js +2 -2
- package/core/platform/platform.js.map +1 -1
- package/core/platform/platform_node_typecheck-tsconfig.json +74 -0
- package/generated/protocol.d.ts +1517 -592
- package/locales/af.json +83 -38
- package/locales/am.json +83 -38
- package/locales/ar.json +86 -41
- package/locales/as.json +83 -38
- package/locales/az.json +83 -38
- package/locales/be.json +81 -36
- package/locales/bg.json +81 -36
- package/locales/bn.json +83 -38
- package/locales/bs.json +82 -37
- package/locales/ca.json +81 -36
- package/locales/cs.json +81 -36
- package/locales/cy.json +83 -38
- package/locales/da.json +83 -38
- package/locales/de.json +81 -36
- package/locales/el.json +82 -37
- package/locales/en-GB.json +83 -38
- package/locales/en-US.json +104 -35
- package/locales/en-XL.json +104 -35
- package/locales/es-419.json +81 -36
- package/locales/es.json +82 -37
- package/locales/et.json +83 -38
- package/locales/eu.json +81 -36
- package/locales/fa.json +84 -39
- package/locales/fi.json +81 -36
- package/locales/fil.json +83 -38
- package/locales/fr-CA.json +82 -37
- package/locales/fr.json +168 -123
- package/locales/gl.json +82 -37
- package/locales/gu.json +82 -37
- package/locales/he.json +96 -51
- package/locales/hi.json +82 -37
- package/locales/hr.json +81 -36
- package/locales/hu.json +82 -37
- package/locales/hy.json +82 -37
- package/locales/id.json +83 -38
- package/locales/is.json +82 -37
- package/locales/it.json +81 -36
- package/locales/ja.json +81 -36
- package/locales/ka.json +83 -38
- package/locales/kk.json +81 -36
- package/locales/km.json +83 -38
- package/locales/kn.json +82 -37
- package/locales/ko.json +82 -37
- package/locales/ky.json +81 -36
- package/locales/lo.json +82 -37
- package/locales/lt.json +81 -36
- package/locales/lv.json +81 -36
- package/locales/mk.json +84 -39
- package/locales/ml.json +82 -37
- package/locales/mn.json +82 -37
- package/locales/mr.json +83 -38
- package/locales/ms.json +81 -36
- package/locales/my.json +82 -37
- package/locales/ne.json +82 -37
- package/locales/nl.json +82 -37
- package/locales/no.json +81 -36
- package/locales/or.json +81 -36
- package/locales/pa.json +81 -36
- package/locales/pl.json +81 -36
- package/locales/pt-PT.json +81 -36
- package/locales/pt.json +83 -38
- package/locales/ro.json +82 -37
- package/locales/ru.json +81 -36
- package/locales/si.json +81 -36
- package/locales/sk.json +81 -36
- package/locales/sl.json +81 -36
- package/locales/sq.json +82 -37
- package/locales/sr-Latn.json +82 -37
- package/locales/sr.json +82 -37
- package/locales/sv.json +84 -39
- package/locales/sw.json +83 -38
- package/locales/ta.json +82 -37
- package/locales/te.json +82 -37
- package/locales/th.json +82 -37
- package/locales/tr.json +81 -36
- package/locales/uk.json +81 -36
- package/locales/ur.json +82 -37
- package/locales/uz.json +82 -37
- package/locales/vi.json +83 -38
- package/locales/zh-HK.json +81 -36
- package/locales/zh-TW.json +84 -39
- package/locales/zh.json +84 -39
- package/locales/zu.json +82 -37
- package/models/cpu_profile/CPUProfileDataModel.d.ts +9 -0
- package/models/cpu_profile/CPUProfileDataModel.js +9 -7
- package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
- package/models/cpu_profile/ProfileTreeModel.d.ts +3 -2
- package/models/cpu_profile/ProfileTreeModel.js +6 -7
- package/models/cpu_profile/ProfileTreeModel.js.map +1 -1
- package/models/cpu_profile/cpu_profile-tsconfig.json +4 -3
- package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/EntityMapper.d.ts +1 -0
- package/models/trace/EntityMapper.js +10 -0
- package/models/trace/EntityMapper.js.map +1 -1
- package/models/trace/EventsSerializer.js +10 -2
- package/models/trace/EventsSerializer.js.map +1 -1
- package/models/trace/LanternComputationData.d.ts +1 -1
- package/models/trace/LanternComputationData.js +3 -8
- package/models/trace/LanternComputationData.js.map +1 -1
- package/models/trace/ModelImpl.d.ts +1 -0
- package/models/trace/ModelImpl.js +9 -6
- package/models/trace/ModelImpl.js.map +1 -1
- package/models/trace/Processor.js +23 -23
- package/models/trace/Processor.js.map +1 -1
- package/models/trace/Styles.js +13 -5
- package/models/trace/Styles.js.map +1 -1
- package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/extras/Initiators.d.ts +12 -0
- package/models/trace/extras/Initiators.js +47 -0
- package/models/trace/extras/Initiators.js.map +1 -0
- package/models/trace/extras/TraceTree.js +13 -5
- package/models/trace/extras/TraceTree.js.map +1 -1
- package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/extras/extras-tsconfig.json +11 -3
- package/models/trace/extras/extras.d.ts +0 -3979
- package/models/trace/extras/extras.js +0 -3979
- package/models/trace/extras/extras.js.map +1 -1
- package/models/trace/handlers/LargestImagePaintHandler.js +2 -2
- package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -1
- package/models/trace/handlers/LayoutShiftsHandler.js +1 -1
- package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
- package/models/trace/handlers/MetaHandler.d.ts +12 -1
- package/models/trace/handlers/MetaHandler.js +10 -1
- package/models/trace/handlers/MetaHandler.js.map +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.d.ts +8 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +22 -4
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
- package/models/trace/handlers/PageLoadMetricsHandler.d.ts +13 -3
- package/models/trace/handlers/PageLoadMetricsHandler.js +71 -27
- package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
- package/models/trace/handlers/SamplesHandler.js +59 -6
- package/models/trace/handlers/SamplesHandler.js.map +1 -1
- package/models/trace/handlers/ScriptsHandler.js +24 -0
- package/models/trace/handlers/ScriptsHandler.js.map +1 -1
- package/models/trace/handlers/UserTimingsHandler.d.ts +1 -1
- package/models/trace/handlers/UserTimingsHandler.js +1 -1
- package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
- package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/handlers/handlers-tsconfig.json +13 -3
- package/models/trace/helpers/Network.js +1 -1
- package/models/trace/helpers/Network.js.map +1 -1
- package/models/trace/helpers/SamplesIntegrator.js +1 -8
- package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
- package/models/trace/helpers/Timing.d.ts +1 -1
- package/models/trace/helpers/Timing.js +9 -2
- package/models/trace/helpers/Timing.js.map +1 -1
- package/models/trace/helpers/Trace.d.ts +1 -0
- package/models/trace/helpers/Trace.js +12 -5
- package/models/trace/helpers/Trace.js.map +1 -1
- package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/helpers/helpers-tsconfig.json +7 -3
- package/models/trace/insights/CLSCulprits.d.ts +1 -1
- package/models/trace/insights/CLSCulprits.js +2 -1
- package/models/trace/insights/CLSCulprits.js.map +1 -1
- package/models/trace/insights/Cache.d.ts +1 -1
- package/models/trace/insights/Cache.js +2 -1
- package/models/trace/insights/Cache.js.map +1 -1
- package/models/trace/insights/CharacterSet.d.ts +49 -0
- package/models/trace/insights/CharacterSet.js +132 -0
- package/models/trace/insights/CharacterSet.js.map +1 -0
- package/models/trace/insights/Common.d.ts +2 -2
- package/models/trace/insights/Common.js +1 -6
- package/models/trace/insights/Common.js.map +1 -1
- package/models/trace/insights/DOMSize.d.ts +1 -1
- package/models/trace/insights/DOMSize.js +2 -1
- package/models/trace/insights/DOMSize.js.map +1 -1
- package/models/trace/insights/DocumentLatency.d.ts +1 -1
- package/models/trace/insights/DocumentLatency.js +2 -1
- package/models/trace/insights/DocumentLatency.js.map +1 -1
- package/models/trace/insights/DuplicatedJavaScript.d.ts +1 -1
- package/models/trace/insights/DuplicatedJavaScript.js +2 -1
- package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
- package/models/trace/insights/FontDisplay.d.ts +1 -1
- package/models/trace/insights/FontDisplay.js +2 -1
- package/models/trace/insights/FontDisplay.js.map +1 -1
- package/models/trace/insights/ForcedReflow.d.ts +2 -2
- package/models/trace/insights/ForcedReflow.js +3 -2
- package/models/trace/insights/ForcedReflow.js.map +1 -1
- package/models/trace/insights/INPBreakdown.d.ts +1 -1
- package/models/trace/insights/INPBreakdown.js +2 -1
- package/models/trace/insights/INPBreakdown.js.map +1 -1
- package/models/trace/insights/ImageDelivery.d.ts +1 -1
- package/models/trace/insights/ImageDelivery.js +2 -1
- package/models/trace/insights/ImageDelivery.js.map +1 -1
- package/models/trace/insights/LCPBreakdown.d.ts +2 -2
- package/models/trace/insights/LCPBreakdown.js +4 -3
- package/models/trace/insights/LCPBreakdown.js.map +1 -1
- package/models/trace/insights/LCPDiscovery.d.ts +8 -4
- package/models/trace/insights/LCPDiscovery.js +18 -11
- package/models/trace/insights/LCPDiscovery.js.map +1 -1
- package/models/trace/insights/LegacyJavaScript.d.ts +1 -1
- package/models/trace/insights/LegacyJavaScript.js +2 -1
- package/models/trace/insights/LegacyJavaScript.js.map +1 -1
- package/models/trace/insights/Models.d.ts +1 -0
- package/models/trace/insights/Models.js +1 -0
- package/models/trace/insights/Models.js.map +1 -1
- package/models/trace/insights/ModernHTTP.d.ts +1 -1
- package/models/trace/insights/ModernHTTP.js +2 -1
- package/models/trace/insights/ModernHTTP.js.map +1 -1
- package/models/trace/insights/NetworkDependencyTree.d.ts +1 -1
- package/models/trace/insights/NetworkDependencyTree.js +6 -4
- package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
- package/models/trace/insights/RenderBlocking.d.ts +2 -2
- package/models/trace/insights/RenderBlocking.js +8 -7
- package/models/trace/insights/RenderBlocking.js.map +1 -1
- package/models/trace/insights/SlowCSSSelector.d.ts +1 -1
- package/models/trace/insights/SlowCSSSelector.js +2 -1
- package/models/trace/insights/SlowCSSSelector.js.map +1 -1
- package/models/trace/insights/ThirdParties.js +2 -1
- package/models/trace/insights/ThirdParties.js.map +1 -1
- package/models/trace/insights/Viewport.d.ts +1 -1
- package/models/trace/insights/Viewport.js +2 -1
- package/models/trace/insights/Viewport.js.map +1 -1
- package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/insights/insights-tsconfig.json +26 -3
- package/models/trace/insights/types.d.ts +17 -6
- package/models/trace/insights/types.js +1 -0
- package/models/trace/insights/types.js.map +1 -1
- package/models/trace/lantern/core/core-tsconfig.json +4 -3
- package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/graph/graph-tsconfig.json +4 -3
- package/models/trace/lantern/lantern-tsconfig.json +4 -3
- package/models/trace/lantern/metrics/FirstContentfulPaint.js +6 -6
- package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +1 -1
- package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/metrics/metrics-tsconfig.json +4 -3
- package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/simulation/simulation-tsconfig.json +4 -3
- package/models/trace/lantern/types/Lantern.d.ts +7 -7
- package/models/trace/lantern/types/Lantern.js.map +1 -1
- package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/lantern/types/types-tsconfig.json +4 -3
- package/models/trace/trace-tsconfig.json +7 -3
- package/models/trace/types/Configuration.d.ts +1 -4
- package/models/trace/types/Configuration.js +0 -1
- package/models/trace/types/Configuration.js.map +1 -1
- package/models/trace/types/File.d.ts +8 -0
- package/models/trace/types/File.js.map +1 -1
- package/models/trace/types/TraceEvents.d.ts +97 -15
- package/models/trace/types/TraceEvents.js +44 -11
- package/models/trace/types/TraceEvents.js.map +1 -1
- package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +4 -3
- package/models/trace/types/types-tsconfig.json +10 -3
- package/package.json +1 -1
- package/test/test-trace-engine.mjs +8 -9
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts +0 -4
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts.map +0 -1
- package/core/platform/DOMUtilities.d.ts +0 -16
- package/core/platform/DOMUtilities.js +0 -123
- package/core/platform/DOMUtilities.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/File.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2023 The Chromium Authors\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 SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as CrUXManager from '../../../models/crux-manager/crux-manager.js';\n\nimport type {TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, ProcessID, SampleIndex, ThreadID} from './TraceEvents.js';\n\nexport interface TraceFile {\n traceEvents: readonly Event[];\n metadata: MetaData;\n}\n\nexport interface Breadcrumb {\n window: TraceWindowMicro;\n child: Breadcrumb|null;\n}\n\nexport enum DataOrigin {\n CPU_PROFILE = 'CPUProfile',\n TRACE_EVENTS = 'TraceEvents',\n}\n\n/**\n * The Entries link can have 3 stated:\n * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.\n * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet\n * 3. Link connected - final state, both entries present\n */\nexport enum EntriesLinkState {\n CREATION_NOT_STARTED = 'creation_not_started',\n PENDING_TO_EVENT = 'pending_to_event',\n CONNECTED = 'connected',\n}\n\nexport enum EventKeyType {\n RAW_EVENT = 'r',\n SYNTHETIC_EVENT = 's',\n PROFILE_CALL = 'p',\n LEGACY_TIMELINE_FRAME = 'l',\n}\n\n/**\n * Represents an object that is saved in the file when user created annotations in the timeline.\n *\n * Expected to add more annotations.\n */\nexport interface SerializedAnnotations {\n entryLabels: EntryLabelAnnotationSerialized[];\n labelledTimeRanges: TimeRangeAnnotationSerialized[];\n linksBetweenEntries: EntriesLinkAnnotationSerialized[];\n}\n\n/**\n * Represents an object that is used to store the Entry Label annotation that is created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotation {\n type: 'ENTRY_LABEL';\n entry: Event|LegacyTimelineFrame;\n label: string;\n}\n\n/**\n * Represents an object that is used to store the Labelled Time Range Annotation that is created when a user creates a Time Range Selection in the timeline.\n */\nexport interface TimeRangeAnnotation {\n type: 'TIME_RANGE';\n label: string;\n bounds: TraceWindowMicro;\n}\n\nexport interface EntriesLinkAnnotation {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: Event;\n entryTo?: Event;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotationSerialized {\n entry: SerializableKey;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a time range with a label in the timeline.\n */\nexport interface TimeRangeAnnotationSerialized {\n bounds: TraceWindowMicro;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a link between entries in the timeline.\n */\nexport interface EntriesLinkAnnotationSerialized {\n entryFrom: SerializableKey;\n entryTo: SerializableKey;\n}\n\n/**\n * `Annotation` are the user-created annotations that are saved into the metadata.\n * Those annotations are rendered on the timeline by `Overlays.ts`\n *\n * TODO: Implement other OverlayAnnotations (annotated time ranges, links between entries).\n * TODO: Save/load overlay annotations to/from the trace file.\n */\nexport type Annotation = EntryLabelAnnotation|TimeRangeAnnotation|EntriesLinkAnnotation;\n\nexport function isTimeRangeAnnotation(annotation: Annotation): annotation is TimeRangeAnnotation {\n return annotation.type === 'TIME_RANGE';\n}\n\nexport function isEntryLabelAnnotation(annotation: Annotation): annotation is EntryLabelAnnotation {\n return annotation.type === 'ENTRY_LABEL';\n}\n\nexport function isEntriesLinkAnnotation(annotation: Annotation): annotation is EntriesLinkAnnotation {\n return annotation.type === 'ENTRIES_LINK';\n}\n\n/**\n * Serializable keys are created for trace events to be able to save\n * references to timeline events in a trace file. These keys enable\n * user modifications that can be saved. See go/cpq:event-data-json for\n * more details on the key format.\n **/\nexport type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;\nexport type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;\nexport type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;\nexport type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;\nexport type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey;\n\n/** Serializable keys values objects contain data that maps the keys to original Trace Events **/\nexport interface RawEventKeyValues {\n type: EventKeyType.RAW_EVENT;\n rawIndex: number;\n}\n\nexport interface SyntheticEventKeyValues {\n type: EventKeyType.SYNTHETIC_EVENT;\n rawIndex: number;\n}\n\nexport interface ProfileCallKeyValues {\n type: EventKeyType.PROFILE_CALL;\n processID: ProcessID;\n threadID: ThreadID;\n sampleIndex: SampleIndex;\n protocol: Protocol.integer;\n}\n\nexport interface LegacyTimelineFrameKeyValues {\n type: EventKeyType.LEGACY_TIMELINE_FRAME;\n rawIndex: number;\n}\n\nexport type SerializableKeyValues =\n RawEventKeyValues|ProfileCallKeyValues|SyntheticEventKeyValues|LegacyTimelineFrameKeyValues;\n\nexport interface Modifications {\n entriesModifications: {\n // Entries hidden by the user\n hiddenEntries: SerializableKey[],\n // Entries that parent a hiddenEntry\n expandableEntries: SerializableKey[],\n };\n initialBreadcrumb: Breadcrumb;\n annotations: SerializedAnnotations;\n}\n\n/**\n * IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig\n * However, the PerfUI code should not depend on the model/trace, and similarly\n * this model cannot depend on that code, so we duplicate it.\n **/\nexport interface TrackVisualConfig {\n hidden: boolean;\n expanded: boolean;\n originalIndex: number;\n visualIndex: number;\n trackName: string;\n}\n\n/**\n * Stores the visual config if the user has modified it. Split into \"main\" and\n * \"network\" so we can pass the relevant config into the right data provider.\n * NOTE: as of August 2025 (M141) we currently do not export this in new\n * traces, or use it if an existing trace is imported with it.\n */\nexport interface PersistedTraceVisualConfig {\n main: TrackVisualConfig[]|null;\n network: TrackVisualConfig[]|null;\n}\n\n/**\n * Trace metadata that we persist to the file. This will allow us to\n * store specifics for the trace, e.g., which tracks should be visible\n * on load.\n */\nexport interface MetaData {\n source?: 'DevTools';\n startTime?: string;\n emulatedDeviceTitle?: string;\n // Only set if network throttling is active.\n networkThrottling?: string;\n // Only set if network throttling is active.\n networkThrottlingConditions?: Omit<SDK.NetworkManager.Conditions, 'title'>;\n // Only set if CPU throttling is active.\n cpuThrottling?: number;\n dataOrigin?: DataOrigin;\n enhancedTraceVersion?: number;\n modifications?: Modifications;\n cruxFieldData?: CrUXManager.PageResult[];\n /** Currently only stores JS maps, not CSS. This never stores data url source maps. */\n sourceMaps?: MetadataSourceMap[];\n visualTrackConfig?: PersistedTraceVisualConfig;\n hostDPR?: number;\n}\n\nexport interface MetadataSourceMap {\n url: string;\n /** If not defined, then this was a data url. */\n sourceMapUrl?: string;\n sourceMap: SDK.SourceMap.SourceMapV3;\n}\n\nexport type Contents = TraceFile|Event[];\n\nexport function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {\n const parts = key.split('-');\n const type = parts[0];\n\n switch (type) {\n case EventKeyType.PROFILE_CALL:\n if (parts.length !== 5 ||\n !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {\n throw new Error(`Invalid ProfileCallKey: ${key}`);\n }\n return {\n type: parts[0],\n processID: parseInt(parts[1], 10),\n threadID: parseInt(parts[2], 10),\n sampleIndex: parseInt(parts[3], 10),\n protocol: parseInt(parts[4], 10),\n } as ProfileCallKeyValues;\n case EventKeyType.RAW_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid RawEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as RawEventKeyValues;\n case EventKeyType.SYNTHETIC_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid SyntheticEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as SyntheticEventKeyValues;\n case EventKeyType.LEGACY_TIMELINE_FRAME: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n\n default:\n throw new Error(`Unknown trace event key: ${key}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/File.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2023 The Chromium Authors\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 SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as CrUXManager from '../../../models/crux-manager/crux-manager.js';\n\nimport type {TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, ProcessID, SampleIndex, ThreadID} from './TraceEvents.js';\n\nexport interface TraceFile {\n traceEvents: readonly Event[];\n metadata: MetaData;\n}\n\nexport interface Breadcrumb {\n window: TraceWindowMicro;\n child: Breadcrumb|null;\n}\n\nexport enum DataOrigin {\n CPU_PROFILE = 'CPUProfile',\n TRACE_EVENTS = 'TraceEvents',\n}\n\n/**\n * The Entries link can have 3 stated:\n * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.\n * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet\n * 3. Link connected - final state, both entries present\n */\nexport enum EntriesLinkState {\n CREATION_NOT_STARTED = 'creation_not_started',\n PENDING_TO_EVENT = 'pending_to_event',\n CONNECTED = 'connected',\n}\n\nexport enum EventKeyType {\n RAW_EVENT = 'r',\n SYNTHETIC_EVENT = 's',\n PROFILE_CALL = 'p',\n LEGACY_TIMELINE_FRAME = 'l',\n}\n\n/**\n * Represents an object that is saved in the file when user created annotations in the timeline.\n *\n * Expected to add more annotations.\n */\nexport interface SerializedAnnotations {\n entryLabels: EntryLabelAnnotationSerialized[];\n labelledTimeRanges: TimeRangeAnnotationSerialized[];\n linksBetweenEntries: EntriesLinkAnnotationSerialized[];\n}\n\n/**\n * Represents an object that is used to store the Entry Label annotation that is created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotation {\n type: 'ENTRY_LABEL';\n entry: Event|LegacyTimelineFrame;\n label: string;\n}\n\n/**\n * Represents an object that is used to store the Labelled Time Range Annotation that is created when a user creates a Time Range Selection in the timeline.\n */\nexport interface TimeRangeAnnotation {\n type: 'TIME_RANGE';\n label: string;\n bounds: TraceWindowMicro;\n}\n\nexport interface EntriesLinkAnnotation {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: Event;\n entryTo?: Event;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotationSerialized {\n entry: SerializableKey;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a time range with a label in the timeline.\n */\nexport interface TimeRangeAnnotationSerialized {\n bounds: TraceWindowMicro;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a link between entries in the timeline.\n */\nexport interface EntriesLinkAnnotationSerialized {\n entryFrom: SerializableKey;\n entryTo: SerializableKey;\n}\n\n/**\n * `Annotation` are the user-created annotations that are saved into the metadata.\n * Those annotations are rendered on the timeline by `Overlays.ts`\n *\n * TODO: Implement other OverlayAnnotations (annotated time ranges, links between entries).\n * TODO: Save/load overlay annotations to/from the trace file.\n */\nexport type Annotation = EntryLabelAnnotation|TimeRangeAnnotation|EntriesLinkAnnotation;\n\nexport function isTimeRangeAnnotation(annotation: Annotation): annotation is TimeRangeAnnotation {\n return annotation.type === 'TIME_RANGE';\n}\n\nexport function isEntryLabelAnnotation(annotation: Annotation): annotation is EntryLabelAnnotation {\n return annotation.type === 'ENTRY_LABEL';\n}\n\nexport function isEntriesLinkAnnotation(annotation: Annotation): annotation is EntriesLinkAnnotation {\n return annotation.type === 'ENTRIES_LINK';\n}\n\n/**\n * Serializable keys are created for trace events to be able to save\n * references to timeline events in a trace file. These keys enable\n * user modifications that can be saved. See go/cpq:event-data-json for\n * more details on the key format.\n **/\nexport type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;\nexport type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;\nexport type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;\nexport type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;\nexport type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey;\n\n/** Serializable keys values objects contain data that maps the keys to original Trace Events **/\nexport interface RawEventKeyValues {\n type: EventKeyType.RAW_EVENT;\n rawIndex: number;\n}\n\nexport interface SyntheticEventKeyValues {\n type: EventKeyType.SYNTHETIC_EVENT;\n rawIndex: number;\n}\n\nexport interface ProfileCallKeyValues {\n type: EventKeyType.PROFILE_CALL;\n processID: ProcessID;\n threadID: ThreadID;\n sampleIndex: SampleIndex;\n protocol: Protocol.integer;\n}\n\nexport interface LegacyTimelineFrameKeyValues {\n type: EventKeyType.LEGACY_TIMELINE_FRAME;\n rawIndex: number;\n}\n\nexport type SerializableKeyValues =\n RawEventKeyValues|ProfileCallKeyValues|SyntheticEventKeyValues|LegacyTimelineFrameKeyValues;\n\nexport interface Modifications {\n entriesModifications: {\n // Entries hidden by the user\n hiddenEntries: SerializableKey[],\n // Entries that parent a hiddenEntry\n expandableEntries: SerializableKey[],\n };\n initialBreadcrumb: Breadcrumb;\n annotations: SerializedAnnotations;\n}\n\n/**\n * IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig\n * However, the PerfUI code should not depend on the model/trace, and similarly\n * this model cannot depend on that code, so we duplicate it.\n **/\nexport interface TrackVisualConfig {\n hidden: boolean;\n expanded: boolean;\n originalIndex: number;\n visualIndex: number;\n trackName: string;\n}\n\n/**\n * Stores the visual config if the user has modified it. Split into \"main\" and\n * \"network\" so we can pass the relevant config into the right data provider.\n * NOTE: as of August 2025 (M141) we currently do not export this in new\n * traces, or use it if an existing trace is imported with it.\n */\nexport interface PersistedTraceVisualConfig {\n main: TrackVisualConfig[]|null;\n network: TrackVisualConfig[]|null;\n}\n\n/**\n * Trace metadata that we persist to the file. This will allow us to\n * store specifics for the trace, e.g., which tracks should be visible\n * on load.\n */\nexport interface MetaData {\n source?: 'DevTools';\n startTime?: string;\n emulatedDeviceTitle?: string;\n // Only set if network throttling is active.\n networkThrottling?: string;\n // Only set if network throttling is active.\n networkThrottlingConditions?: Omit<SDK.NetworkManager.Conditions, 'title'>;\n // Only set if CPU throttling is active.\n cpuThrottling?: number;\n dataOrigin?: DataOrigin;\n enhancedTraceVersion?: number;\n modifications?: Modifications;\n cruxFieldData?: CrUXManager.PageResult[];\n /** Currently only stores JS maps, not CSS. This never stores data url source maps. */\n sourceMaps?: MetadataSourceMap[];\n /** Currently only stores HTML and CSS resources. */\n resources?: MetadataResource[];\n visualTrackConfig?: PersistedTraceVisualConfig;\n hostDPR?: number;\n}\n\nexport interface MetadataSourceMap {\n url: string;\n /** If not defined, then this was a data url. */\n sourceMapUrl?: string;\n sourceMap: SDK.SourceMap.SourceMapV3;\n}\n\nexport interface MetadataResource {\n url: string;\n frame: string;\n content: string;\n mimeType: string;\n}\n\nexport type Contents = TraceFile|Event[];\n\nexport function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {\n const parts = key.split('-');\n const type = parts[0];\n\n switch (type) {\n case EventKeyType.PROFILE_CALL:\n if (parts.length !== 5 ||\n !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {\n throw new Error(`Invalid ProfileCallKey: ${key}`);\n }\n return {\n type: parts[0],\n processID: parseInt(parts[1], 10),\n threadID: parseInt(parts[2], 10),\n sampleIndex: parseInt(parts[3], 10),\n protocol: parseInt(parts[4], 10),\n } as ProfileCallKeyValues;\n case EventKeyType.RAW_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid RawEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as RawEventKeyValues;\n case EventKeyType.SYNTHETIC_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid SyntheticEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as SyntheticEventKeyValues;\n case EventKeyType.LEGACY_TIMELINE_FRAME: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n\n default:\n throw new Error(`Unknown trace event key: ${key}`);\n }\n}\n"]}
|
|
@@ -49,6 +49,7 @@ export interface Event {
|
|
|
49
49
|
tdur?: Micro;
|
|
50
50
|
dur?: Micro;
|
|
51
51
|
}
|
|
52
|
+
export declare function objectIsEvent(obj: object): obj is Event;
|
|
52
53
|
export interface Args {
|
|
53
54
|
data?: ArgsData;
|
|
54
55
|
sampleTraceId?: number;
|
|
@@ -59,6 +60,8 @@ export interface ArgsData {
|
|
|
59
60
|
sampleTraceId?: number;
|
|
60
61
|
url?: string;
|
|
61
62
|
navigationId?: string;
|
|
63
|
+
/** For soft navs. */
|
|
64
|
+
performanceTimelineNavigationId?: number;
|
|
62
65
|
frame?: string;
|
|
63
66
|
}
|
|
64
67
|
export interface CallFrame {
|
|
@@ -104,6 +107,7 @@ export interface Profile extends Sample {
|
|
|
104
107
|
args: Args & {
|
|
105
108
|
data: ArgsData & {
|
|
106
109
|
startTime: Micro;
|
|
110
|
+
source?: ProfileSource;
|
|
107
111
|
};
|
|
108
112
|
};
|
|
109
113
|
}
|
|
@@ -114,7 +118,9 @@ export interface ProfileChunk extends Sample {
|
|
|
114
118
|
data?: ArgsData & {
|
|
115
119
|
cpuProfile?: PartialProfile;
|
|
116
120
|
timeDeltas?: Micro[];
|
|
117
|
-
lines?:
|
|
121
|
+
lines?: number[];
|
|
122
|
+
source?: ProfileSource;
|
|
123
|
+
columns?: number[];
|
|
118
124
|
};
|
|
119
125
|
};
|
|
120
126
|
}
|
|
@@ -128,6 +134,18 @@ export interface PartialProfile {
|
|
|
128
134
|
*/
|
|
129
135
|
trace_ids?: Record<string, number>;
|
|
130
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Source of profile data, used to select the most relevant profile when
|
|
139
|
+
* multiple profiles exist for the same thread.
|
|
140
|
+
*
|
|
141
|
+
* - 'Inspector': User-initiated via console.profile()/profileEnd().
|
|
142
|
+
* - 'Internal': Browser-initiated during performance traces.
|
|
143
|
+
* - 'SelfProfiling': Page-initiated via JS Self-Profiling API.
|
|
144
|
+
*
|
|
145
|
+
* Selection priority (see PROFILE_SOURCES_BY_PRIORITY in SamplesHandler.ts).
|
|
146
|
+
*/
|
|
147
|
+
export type ProfileSource = 'Inspector' | 'SelfProfiling' | 'Internal';
|
|
148
|
+
export declare const VALID_PROFILE_SOURCES: readonly ProfileSource[];
|
|
131
149
|
export interface PartialNode {
|
|
132
150
|
callFrame: CallFrame;
|
|
133
151
|
id: CallFrameID;
|
|
@@ -511,7 +529,7 @@ export interface Mark extends Event {
|
|
|
511
529
|
ph: Phase.MARK;
|
|
512
530
|
}
|
|
513
531
|
export interface NavigationStart extends Mark {
|
|
514
|
-
name:
|
|
532
|
+
name: Name.NAVIGATION_START;
|
|
515
533
|
args: Args & {
|
|
516
534
|
frame: string;
|
|
517
535
|
data?: ArgsData & {
|
|
@@ -536,6 +554,24 @@ export interface NavigationStart extends Mark {
|
|
|
536
554
|
};
|
|
537
555
|
};
|
|
538
556
|
}
|
|
557
|
+
export interface SoftNavigationStart extends Event {
|
|
558
|
+
name: Name.SOFT_NAVIGATION_START;
|
|
559
|
+
ph: Phase.ASYNC_NESTABLE_INSTANT;
|
|
560
|
+
args: Args & {
|
|
561
|
+
frame: string;
|
|
562
|
+
context: {
|
|
563
|
+
softNavContextId: number;
|
|
564
|
+
URL: string;
|
|
565
|
+
timeOrigin: number;
|
|
566
|
+
domModifications: number;
|
|
567
|
+
firstContentfulPaint: number;
|
|
568
|
+
paintedArea: number;
|
|
569
|
+
performanceTimelineNavigationId: number;
|
|
570
|
+
repaintedArea: number;
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
export declare function isSoftNavigationStart(event: Event): event is SoftNavigationStart;
|
|
539
575
|
export interface FirstContentfulPaint extends Mark {
|
|
540
576
|
name: Name.MARK_FCP;
|
|
541
577
|
args: Args & {
|
|
@@ -546,7 +582,7 @@ export interface FirstContentfulPaint extends Mark {
|
|
|
546
582
|
};
|
|
547
583
|
}
|
|
548
584
|
export interface FirstPaint extends Mark {
|
|
549
|
-
name:
|
|
585
|
+
name: Name.MARK_FIRST_PAINT;
|
|
550
586
|
args: Args & {
|
|
551
587
|
frame: string;
|
|
552
588
|
data?: ArgsData & {
|
|
@@ -554,11 +590,7 @@ export interface FirstPaint extends Mark {
|
|
|
554
590
|
};
|
|
555
591
|
};
|
|
556
592
|
}
|
|
557
|
-
export type PageLoadEvent = FirstContentfulPaint | MarkDOMContent | InteractiveTime |
|
|
558
|
-
export declare const MarkerName: readonly ["MarkDOMContent", "MarkLoad", "firstPaint", "firstContentfulPaint", "largestContentfulPaint::Candidate"];
|
|
559
|
-
export interface MarkerEvent extends Event {
|
|
560
|
-
name: typeof MarkerName[number];
|
|
561
|
-
}
|
|
593
|
+
export type PageLoadEvent = FirstContentfulPaint | MarkDOMContent | InteractiveTime | AnyLargestContentfulPaintCandidate | LayoutShift | FirstPaint | MarkLoad | NavigationStart | SoftNavigationStart;
|
|
562
594
|
export declare function isMarkerEvent(event: Event): event is MarkerEvent;
|
|
563
595
|
export declare function eventIsPageLoadEvent(event: Event): event is PageLoadEvent;
|
|
564
596
|
export interface LargestContentfulPaintCandidate extends Mark {
|
|
@@ -577,6 +609,23 @@ export interface LargestContentfulPaintCandidate extends Mark {
|
|
|
577
609
|
};
|
|
578
610
|
};
|
|
579
611
|
}
|
|
612
|
+
export interface LargestContentfulPaintCandidateForSoftNavigation extends Mark {
|
|
613
|
+
name: Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION;
|
|
614
|
+
args: Args & {
|
|
615
|
+
frame: string;
|
|
616
|
+
data?: ArgsData & {
|
|
617
|
+
candidateIndex: number;
|
|
618
|
+
isOutermostMainFrame: boolean;
|
|
619
|
+
isMainFrame: boolean;
|
|
620
|
+
nodeId: Protocol.DOM.BackendNodeId;
|
|
621
|
+
loadingAttr: string;
|
|
622
|
+
performanceTimelineNavigationId: number;
|
|
623
|
+
type?: string;
|
|
624
|
+
nodeName?: string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
export type AnyLargestContentfulPaintCandidate = LargestContentfulPaintCandidate | LargestContentfulPaintCandidateForSoftNavigation;
|
|
580
629
|
export interface LargestImagePaintCandidate extends Mark {
|
|
581
630
|
name: 'LargestImagePaint::Candidate';
|
|
582
631
|
args: Args & {
|
|
@@ -697,7 +746,7 @@ export interface CommitLoad extends Instant {
|
|
|
697
746
|
};
|
|
698
747
|
}
|
|
699
748
|
export interface MarkDOMContent extends Instant {
|
|
700
|
-
name:
|
|
749
|
+
name: Name.MARK_DOM_CONTENT;
|
|
701
750
|
args: Args & {
|
|
702
751
|
data?: ArgsData & {
|
|
703
752
|
frame: string;
|
|
@@ -708,7 +757,7 @@ export interface MarkDOMContent extends Instant {
|
|
|
708
757
|
};
|
|
709
758
|
}
|
|
710
759
|
export interface MarkLoad extends Instant {
|
|
711
|
-
name:
|
|
760
|
+
name: Name.MARK_LOAD;
|
|
712
761
|
args: Args & {
|
|
713
762
|
data?: ArgsData & {
|
|
714
763
|
frame: string;
|
|
@@ -728,7 +777,7 @@ export interface TraceImpactedNode {
|
|
|
728
777
|
old_rect: TraceRect;
|
|
729
778
|
debug_name?: string;
|
|
730
779
|
}
|
|
731
|
-
type LayoutShiftData = ArgsData & {
|
|
780
|
+
export type LayoutShiftData = ArgsData & {
|
|
732
781
|
cumulative_score: number;
|
|
733
782
|
frame_max_distance: number;
|
|
734
783
|
had_recent_input: boolean;
|
|
@@ -781,7 +830,7 @@ export declare const NO_NAVIGATION = "NO_NAVIGATION";
|
|
|
781
830
|
* portion of the trace for which we don't have any navigation event for (as it happeneded prior
|
|
782
831
|
* to the trace start).
|
|
783
832
|
*/
|
|
784
|
-
export type NavigationId = string
|
|
833
|
+
export type NavigationId = string;
|
|
785
834
|
/**
|
|
786
835
|
* This is a synthetic Layout shift cluster. The rawSourceEvent is the worst layout shift event
|
|
787
836
|
* in the cluster.
|
|
@@ -1031,6 +1080,17 @@ export interface ParseMetaViewport extends Instant {
|
|
|
1031
1080
|
};
|
|
1032
1081
|
}
|
|
1033
1082
|
export declare function isParseMetaViewport(event: Event): event is ParseMetaViewport;
|
|
1083
|
+
export type MetaCharsetDisposition = 'found-in-first-1024-bytes' | 'found-after-first-1024-bytes' | 'not-found';
|
|
1084
|
+
export interface MetaCharsetCheck extends Instant {
|
|
1085
|
+
name: Name.META_CHARSET_CHECK;
|
|
1086
|
+
args: Args & {
|
|
1087
|
+
data: {
|
|
1088
|
+
frame: string;
|
|
1089
|
+
disposition: MetaCharsetDisposition;
|
|
1090
|
+
};
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
export declare function isMetaCharsetCheck(event: Event): event is MetaCharsetCheck;
|
|
1034
1094
|
export interface LinkPreconnect extends Instant {
|
|
1035
1095
|
name: Name.LINK_PRECONNECT;
|
|
1036
1096
|
args: Args & {
|
|
@@ -1414,6 +1474,7 @@ export interface SyntheticJSSample extends Event {
|
|
|
1414
1474
|
};
|
|
1415
1475
|
ph: Phase.INSTANT;
|
|
1416
1476
|
}
|
|
1477
|
+
export declare function isJSSample(event: Event): event is SyntheticJSSample;
|
|
1417
1478
|
export declare function isSyntheticInteraction(event: Event): event is SyntheticInteractionPair;
|
|
1418
1479
|
export interface DrawFrame extends Instant {
|
|
1419
1480
|
name: Name.DRAW_FRAME;
|
|
@@ -1649,7 +1710,8 @@ export declare function isSyntheticAnimation(event: Event): event is SyntheticAn
|
|
|
1649
1710
|
export declare function isLayoutShift(event: Event): event is LayoutShift;
|
|
1650
1711
|
export declare function isLayoutInvalidationTracking(event: Event): event is LayoutInvalidationTracking;
|
|
1651
1712
|
export declare function isFirstContentfulPaint(event: Event): event is FirstContentfulPaint;
|
|
1652
|
-
export declare function
|
|
1713
|
+
export declare function isAnyLargestContentfulPaintCandidate(event: Event): event is AnyLargestContentfulPaintCandidate;
|
|
1714
|
+
export declare function isSoftLargestContentfulPaintCandidate(event: Event): event is AnyLargestContentfulPaintCandidate;
|
|
1653
1715
|
export declare function isLargestImagePaintCandidate(event: Event): event is LargestImagePaintCandidate;
|
|
1654
1716
|
export declare function isLargestTextPaintCandidate(event: Event): event is LargestTextPaintCandidate;
|
|
1655
1717
|
export declare function isMarkLoad(event: Event): event is MarkLoad;
|
|
@@ -2014,7 +2076,7 @@ export interface FunctionCall extends Complete {
|
|
|
2014
2076
|
args: Args & {
|
|
2015
2077
|
data?: Partial<CallFrame> & {
|
|
2016
2078
|
frame?: string;
|
|
2017
|
-
isolate?:
|
|
2079
|
+
isolate?: string;
|
|
2018
2080
|
};
|
|
2019
2081
|
};
|
|
2020
2082
|
}
|
|
@@ -2175,6 +2237,7 @@ export declare enum Name {
|
|
|
2175
2237
|
SELECTOR_STATS = "SelectorStats",
|
|
2176
2238
|
BEGIN_COMMIT_COMPOSITOR_FRAME = "BeginCommitCompositorFrame",
|
|
2177
2239
|
PARSE_META_VIEWPORT = "ParseMetaViewport",
|
|
2240
|
+
META_CHARSET_CHECK = "MetaCharsetCheck",
|
|
2178
2241
|
SCROLL_LAYER = "ScrollLayer",
|
|
2179
2242
|
UPDATE_LAYER = "UpdateLayer",
|
|
2180
2243
|
PAINT_SETUP = "PaintSetup",
|
|
@@ -2208,8 +2271,10 @@ export declare enum Name {
|
|
|
2208
2271
|
MARK_FIRST_PAINT = "firstPaint",
|
|
2209
2272
|
MARK_FCP = "firstContentfulPaint",
|
|
2210
2273
|
MARK_LCP_CANDIDATE = "largestContentfulPaint::Candidate",
|
|
2274
|
+
MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION = "largestContentfulPaint::CandidateForSoftNavigation",
|
|
2211
2275
|
MARK_LCP_INVALIDATE = "largestContentfulPaint::Invalidate",
|
|
2212
2276
|
NAVIGATION_START = "navigationStart",
|
|
2277
|
+
SOFT_NAVIGATION_START = "SoftNavigationStart",
|
|
2213
2278
|
CONSOLE_TIME = "ConsoleTime",
|
|
2214
2279
|
USER_TIMING = "UserTiming",
|
|
2215
2280
|
INTERACTIVE_TIME = "InteractiveTime",
|
|
@@ -2262,7 +2327,12 @@ export declare enum Name {
|
|
|
2262
2327
|
ANIMATION_FRAME_PRESENTATION = "AnimationFrame::Presentation",
|
|
2263
2328
|
SYNTHETIC_NETWORK_REQUEST = "SyntheticNetworkRequest",
|
|
2264
2329
|
USER_TIMING_MEASURE = "UserTiming::Measure",
|
|
2265
|
-
LINK_PRECONNECT = "LinkPreconnect"
|
|
2330
|
+
LINK_PRECONNECT = "LinkPreconnect",
|
|
2331
|
+
PRELOAD_RENDER_BLOCKING_STATUS_CHANGE = "PreloadRenderBlockingStatusChange"
|
|
2332
|
+
}
|
|
2333
|
+
export declare const MarkerName: readonly [Name.MARK_DOM_CONTENT, Name.MARK_LOAD, Name.MARK_FIRST_PAINT, Name.MARK_FCP, Name.MARK_LCP_CANDIDATE, Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION, Name.NAVIGATION_START, Name.SOFT_NAVIGATION_START];
|
|
2334
|
+
export interface MarkerEvent extends Event {
|
|
2335
|
+
name: typeof MarkerName[number];
|
|
2266
2336
|
}
|
|
2267
2337
|
/**
|
|
2268
2338
|
* NOT AN EXHAUSTIVE LIST: just some categories we use and refer
|
|
@@ -2367,4 +2437,16 @@ export interface RundownScriptStub extends Event {
|
|
|
2367
2437
|
};
|
|
2368
2438
|
}
|
|
2369
2439
|
export declare function isAnyScriptSourceEvent(event: Event): event is RundownScriptSource | RundownScriptSourceLarge | RundownScriptStub;
|
|
2440
|
+
export interface PreloadRenderBlockingStatusChangeEvent extends Instant {
|
|
2441
|
+
name: Name.PRELOAD_RENDER_BLOCKING_STATUS_CHANGE;
|
|
2442
|
+
cat: 'devtools.timeline';
|
|
2443
|
+
args: Args & {
|
|
2444
|
+
data: {
|
|
2445
|
+
requestId: string;
|
|
2446
|
+
url: string;
|
|
2447
|
+
renderBlocking?: RenderBlocking;
|
|
2448
|
+
};
|
|
2449
|
+
};
|
|
2450
|
+
}
|
|
2451
|
+
export declare function isPreloadRenderBlockingStatusChangeEvent(event: Event): event is PreloadRenderBlockingStatusChangeEvent;
|
|
2370
2452
|
export {};
|
|
@@ -55,6 +55,9 @@ export var Scope;
|
|
|
55
55
|
Scope["PROCESS"] = "p";
|
|
56
56
|
Scope["GLOBAL"] = "g";
|
|
57
57
|
})(Scope || (Scope = {}));
|
|
58
|
+
export function objectIsEvent(obj) {
|
|
59
|
+
return 'cat' in obj && 'name' in obj && 'ts' in obj;
|
|
60
|
+
}
|
|
58
61
|
export function objectIsCallFrame(object) {
|
|
59
62
|
return ('functionName' in object && typeof object.functionName === 'string') &&
|
|
60
63
|
('scriptId' in object && (typeof object.scriptId === 'string' || typeof object.scriptId === 'number')) &&
|
|
@@ -62,6 +65,7 @@ export function objectIsCallFrame(object) {
|
|
|
62
65
|
('lineNumber' in object && typeof object.lineNumber === 'number') &&
|
|
63
66
|
('url' in object && typeof object.url === 'string');
|
|
64
67
|
}
|
|
68
|
+
export const VALID_PROFILE_SOURCES = ['Inspector', 'SelfProfiling', 'Internal'];
|
|
65
69
|
export function isRunTask(event) {
|
|
66
70
|
return event.name === Name.RUN_TASK && event.ph === Phase.COMPLETE;
|
|
67
71
|
}
|
|
@@ -88,17 +92,20 @@ export function isLegacySyntheticScreenshot(event) {
|
|
|
88
92
|
export function isScreenshot(event) {
|
|
89
93
|
return event.name === Name.SCREENSHOT && 'source_id' in (event.args ?? {});
|
|
90
94
|
}
|
|
95
|
+
export function isSoftNavigationStart(event) {
|
|
96
|
+
return event.name === Name.SOFT_NAVIGATION_START;
|
|
97
|
+
}
|
|
91
98
|
const markerTypeGuards = [
|
|
92
99
|
isMarkDOMContent,
|
|
93
100
|
isMarkLoad,
|
|
94
101
|
isFirstPaint,
|
|
95
102
|
isFirstContentfulPaint,
|
|
96
|
-
|
|
103
|
+
isAnyLargestContentfulPaintCandidate,
|
|
97
104
|
isNavigationStart,
|
|
105
|
+
isSoftNavigationStart,
|
|
98
106
|
];
|
|
99
|
-
export const MarkerName = ['MarkDOMContent', 'MarkLoad', 'firstPaint', 'firstContentfulPaint', 'largestContentfulPaint::Candidate'];
|
|
100
107
|
export function isMarkerEvent(event) {
|
|
101
|
-
if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) {
|
|
108
|
+
if (event.ph === Phase.INSTANT || Phase.ASYNC_NESTABLE_INSTANT || event.ph === Phase.MARK) {
|
|
102
109
|
return markerTypeGuards.some(fn => fn(event));
|
|
103
110
|
}
|
|
104
111
|
return false;
|
|
@@ -108,7 +115,7 @@ const pageLoadEventTypeGuards = [
|
|
|
108
115
|
isInteractiveTime,
|
|
109
116
|
];
|
|
110
117
|
export function eventIsPageLoadEvent(event) {
|
|
111
|
-
if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) {
|
|
118
|
+
if (event.ph === Phase.INSTANT || Phase.ASYNC_NESTABLE_INSTANT || event.ph === Phase.MARK) {
|
|
112
119
|
return pageLoadEventTypeGuards.some(fn => fn(event));
|
|
113
120
|
}
|
|
114
121
|
return false;
|
|
@@ -148,6 +155,9 @@ export function isBeginCommitCompositorFrame(event) {
|
|
|
148
155
|
export function isParseMetaViewport(event) {
|
|
149
156
|
return event.name === Name.PARSE_META_VIEWPORT;
|
|
150
157
|
}
|
|
158
|
+
export function isMetaCharsetCheck(event) {
|
|
159
|
+
return event.name === Name.META_CHARSET_CHECK;
|
|
160
|
+
}
|
|
151
161
|
export function isLinkPreconnect(event) {
|
|
152
162
|
return event.name === Name.LINK_PRECONNECT;
|
|
153
163
|
}
|
|
@@ -184,6 +194,9 @@ export function isPipelineReporter(event) {
|
|
|
184
194
|
export function isSyntheticBased(event) {
|
|
185
195
|
return 'rawSourceEvent' in event;
|
|
186
196
|
}
|
|
197
|
+
export function isJSSample(event) {
|
|
198
|
+
return event.name === Name.JS_SAMPLE;
|
|
199
|
+
}
|
|
187
200
|
export function isSyntheticInteraction(event) {
|
|
188
201
|
return Boolean('interactionId' in event && event.args?.data && 'beginEvent' in event.args.data && 'endEvent' in event.args.data);
|
|
189
202
|
}
|
|
@@ -356,10 +369,13 @@ export function isLayoutInvalidationTracking(event) {
|
|
|
356
369
|
return event.name === Name.LAYOUT_INVALIDATION_TRACKING;
|
|
357
370
|
}
|
|
358
371
|
export function isFirstContentfulPaint(event) {
|
|
359
|
-
return event.name ===
|
|
372
|
+
return event.name === Name.MARK_FCP;
|
|
360
373
|
}
|
|
361
|
-
export function
|
|
362
|
-
return event.name === Name.MARK_LCP_CANDIDATE;
|
|
374
|
+
export function isAnyLargestContentfulPaintCandidate(event) {
|
|
375
|
+
return event.name === Name.MARK_LCP_CANDIDATE || event.name === Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION;
|
|
376
|
+
}
|
|
377
|
+
export function isSoftLargestContentfulPaintCandidate(event) {
|
|
378
|
+
return event.name === Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION;
|
|
363
379
|
}
|
|
364
380
|
export function isLargestImagePaintCandidate(event) {
|
|
365
381
|
return event.name === 'LargestImagePaint::Candidate';
|
|
@@ -368,13 +384,13 @@ export function isLargestTextPaintCandidate(event) {
|
|
|
368
384
|
return event.name === 'LargestTextPaint::Candidate';
|
|
369
385
|
}
|
|
370
386
|
export function isMarkLoad(event) {
|
|
371
|
-
return event.name ===
|
|
387
|
+
return event.name === Name.MARK_LOAD;
|
|
372
388
|
}
|
|
373
389
|
export function isFirstPaint(event) {
|
|
374
|
-
return event.name ===
|
|
390
|
+
return event.name === Name.MARK_FIRST_PAINT;
|
|
375
391
|
}
|
|
376
392
|
export function isMarkDOMContent(event) {
|
|
377
|
-
return event.name ===
|
|
393
|
+
return event.name === Name.MARK_DOM_CONTENT;
|
|
378
394
|
}
|
|
379
395
|
export function isInteractiveTime(event) {
|
|
380
396
|
return event.name === 'InteractiveTime';
|
|
@@ -440,7 +456,7 @@ export function isPrePaint(event) {
|
|
|
440
456
|
}
|
|
441
457
|
/** A VALID navigation start (as it has a populated documentLoaderURL) */
|
|
442
458
|
export function isNavigationStart(event) {
|
|
443
|
-
return event.name ===
|
|
459
|
+
return event.name === Name.NAVIGATION_START && event.args?.data?.documentLoaderURL !== '';
|
|
444
460
|
}
|
|
445
461
|
export function isDidCommitSameDocumentNavigation(event) {
|
|
446
462
|
return event.name === 'RenderFrameHostImpl::DidCommitSameDocumentNavigation' && event.ph === Phase.COMPLETE;
|
|
@@ -723,6 +739,7 @@ export var Name;
|
|
|
723
739
|
Name["SELECTOR_STATS"] = "SelectorStats";
|
|
724
740
|
Name["BEGIN_COMMIT_COMPOSITOR_FRAME"] = "BeginCommitCompositorFrame";
|
|
725
741
|
Name["PARSE_META_VIEWPORT"] = "ParseMetaViewport";
|
|
742
|
+
Name["META_CHARSET_CHECK"] = "MetaCharsetCheck";
|
|
726
743
|
/* Paint */
|
|
727
744
|
Name["SCROLL_LAYER"] = "ScrollLayer";
|
|
728
745
|
Name["UPDATE_LAYER"] = "UpdateLayer";
|
|
@@ -762,8 +779,10 @@ export var Name;
|
|
|
762
779
|
Name["MARK_FIRST_PAINT"] = "firstPaint";
|
|
763
780
|
Name["MARK_FCP"] = "firstContentfulPaint";
|
|
764
781
|
Name["MARK_LCP_CANDIDATE"] = "largestContentfulPaint::Candidate";
|
|
782
|
+
Name["MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION"] = "largestContentfulPaint::CandidateForSoftNavigation";
|
|
765
783
|
Name["MARK_LCP_INVALIDATE"] = "largestContentfulPaint::Invalidate";
|
|
766
784
|
Name["NAVIGATION_START"] = "navigationStart";
|
|
785
|
+
Name["SOFT_NAVIGATION_START"] = "SoftNavigationStart";
|
|
767
786
|
Name["CONSOLE_TIME"] = "ConsoleTime";
|
|
768
787
|
Name["USER_TIMING"] = "UserTiming";
|
|
769
788
|
Name["INTERACTIVE_TIME"] = "InteractiveTime";
|
|
@@ -822,7 +841,18 @@ export var Name;
|
|
|
822
841
|
Name["SYNTHETIC_NETWORK_REQUEST"] = "SyntheticNetworkRequest";
|
|
823
842
|
Name["USER_TIMING_MEASURE"] = "UserTiming::Measure";
|
|
824
843
|
Name["LINK_PRECONNECT"] = "LinkPreconnect";
|
|
844
|
+
Name["PRELOAD_RENDER_BLOCKING_STATUS_CHANGE"] = "PreloadRenderBlockingStatusChange";
|
|
825
845
|
})(Name || (Name = {}));
|
|
846
|
+
export const MarkerName = [
|
|
847
|
+
Name.MARK_DOM_CONTENT,
|
|
848
|
+
Name.MARK_LOAD,
|
|
849
|
+
Name.MARK_FIRST_PAINT,
|
|
850
|
+
Name.MARK_FCP,
|
|
851
|
+
Name.MARK_LCP_CANDIDATE,
|
|
852
|
+
Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION,
|
|
853
|
+
Name.NAVIGATION_START,
|
|
854
|
+
Name.SOFT_NAVIGATION_START,
|
|
855
|
+
];
|
|
826
856
|
/**
|
|
827
857
|
* NOT AN EXHAUSTIVE LIST: just some categories we use and refer
|
|
828
858
|
* to in multiple places.
|
|
@@ -850,4 +880,7 @@ export function isRundownScriptSourceLarge(event) {
|
|
|
850
880
|
export function isAnyScriptSourceEvent(event) {
|
|
851
881
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources';
|
|
852
882
|
}
|
|
883
|
+
export function isPreloadRenderBlockingStatusChangeEvent(event) {
|
|
884
|
+
return event.name === Name.PRELOAD_RENDER_BLOCKING_STATUS_CHANGE;
|
|
885
|
+
}
|
|
853
886
|
//# sourceMappingURL=TraceEvents.js.map
|