@paulirish/trace_engine 0.0.66 → 0.0.67-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -22
- package/analyze-trace.mjs +6 -144
- package/core/common/Base64.d.ts +12 -0
- package/core/common/CharacterIdMap.d.ts +5 -0
- package/core/common/Color.d.ts +357 -0
- package/core/common/ColorConverter.d.ts +26 -0
- package/core/common/ColorUtils.d.ts +45 -0
- package/core/common/Console.d.ts +54 -0
- package/core/common/Debouncer.d.ts +8 -0
- package/core/common/EventTarget.d.ts +22 -0
- package/core/common/Gzip.d.ts +23 -0
- package/core/common/JavaScriptMetaData.d.ts +20 -0
- package/core/common/Lazy.d.ts +4 -0
- package/core/common/MapWithDefault.d.ts +9 -0
- package/core/common/Mutex.d.ts +13 -0
- package/core/common/Object.d.ts +20 -0
- package/core/common/ParsedURL.d.ts +87 -0
- package/core/common/Progress.d.ts +47 -0
- package/core/common/ResolverBase.d.ts +29 -0
- package/core/common/ResourceType.d.ts +52 -0
- package/core/common/ReturnToPanel.d.ts +10 -0
- package/core/common/Revealer.d.ts +66 -0
- package/core/common/Runnable.d.ts +14 -0
- package/core/common/SegmentedRange.d.ts +14 -0
- package/core/common/SettingRegistration.d.ts +136 -0
- package/core/common/Settings.d.ts +226 -0
- package/core/common/SimpleHistoryManager.d.ts +20 -0
- package/core/common/Srcset.d.ts +16 -0
- package/core/common/StringOutputStream.d.ts +10 -0
- package/core/common/TextDictionary.d.ts +11 -0
- package/core/common/Throttler.d.ts +12 -0
- package/core/common/Trie.d.ts +24 -0
- package/core/common/VersionController.d.ts +85 -0
- package/core/common/common.d.ts +33 -1
- package/core/host/AidaClient.d.ts +73 -0
- package/core/host/AidaClientTypes.d.ts +355 -0
- package/core/host/AidaGcaTranslation.d.ts +10 -0
- package/core/host/DispatchHttpRequestClient.d.ts +14 -0
- package/core/host/GcaClient.d.ts +14 -0
- package/core/host/GcaTypes.d.ts +411 -0
- package/core/host/GdpClient.d.ts +84 -0
- package/core/host/InspectorFrontendHost.d.ts +29 -0
- package/core/host/InspectorFrontendHostAPI.d.ts +425 -0
- package/core/host/InspectorFrontendHostStub.d.ts +151 -0
- package/core/host/Platform.d.ts +11 -0
- package/core/host/ResourceLoader.d.ts +15 -0
- package/core/host/UserMetrics.d.ts +116 -0
- package/core/host/UserMetricsEnums.d.ts +883 -0
- package/core/host/host.d.ts +13 -1
- package/core/i18n/ByteUtilities.d.ts +11 -0
- package/core/i18n/DevToolsLocale.d.ts +41 -0
- package/core/i18n/NumberFormatter.d.ts +11 -0
- package/core/i18n/i18n.d.ts +10 -0
- package/core/i18n/i18nImpl.d.ts +64 -0
- package/core/i18n/i18nTypes.d.ts +5 -0
- package/core/i18n/locales.d.ts +15 -0
- package/core/i18n/time-utilities.d.ts +16 -0
- package/core/platform/StringUtilities.d.ts +0 -21
- package/core/protocol_client/CDPConnection.d.ts +77 -0
- package/core/protocol_client/ConnectionTransport.d.ts +9 -0
- package/core/protocol_client/DevToolsCDPConnection.d.ts +16 -0
- package/core/protocol_client/InspectorBackend.d.ts +223 -0
- package/core/protocol_client/protocol_client.d.ts +5 -0
- package/core/root/DevToolsContext.d.ts +34 -0
- package/core/root/ExperimentNames.d.ts +8 -0
- package/core/root/Runtime.d.ts +351 -0
- package/core/root/root.d.ts +4 -1
- package/core/sdk/AccessibilityModel.d.ts +76 -0
- package/core/sdk/AnimationModel.d.ts +161 -0
- package/core/sdk/AutofillModel.d.ts +23 -0
- package/core/sdk/CPUProfilerModel.d.ts +46 -0
- package/core/sdk/CPUThrottlingManager.d.ts +47 -0
- package/core/sdk/CSSContainerQuery.d.ts +42 -0
- package/core/sdk/CSSFontFace.d.ts +10 -0
- package/core/sdk/CSSLayer.d.ts +9 -0
- package/core/sdk/CSSLocation.d.ts +14 -0
- package/core/sdk/CSSMatchedStyles.d.ts +138 -0
- package/core/sdk/CSSMedia.d.ts +36 -0
- package/core/sdk/CSSMetadata.d.ts +87 -0
- package/core/sdk/CSSModel.d.ts +180 -0
- package/core/sdk/CSSNavigation.d.ts +10 -0
- package/core/sdk/CSSProperty.d.ts +53 -0
- package/core/sdk/CSSPropertyParser.d.ts +131 -0
- package/core/sdk/CSSPropertyParserMatchers.d.ts +442 -0
- package/core/sdk/CSSQuery.d.ts +22 -0
- package/core/sdk/CSSRule.d.ts +132 -0
- package/core/sdk/CSSScope.d.ts +9 -0
- package/core/sdk/CSSStartingStyle.d.ts +9 -0
- package/core/sdk/CSSStyleDeclaration.d.ts +38 -0
- package/core/sdk/CSSStyleSheetHeader.d.ts +53 -0
- package/core/sdk/CSSSupports.d.ts +10 -0
- package/core/sdk/CategorizedBreakpoint.d.ts +42 -0
- package/core/sdk/ChildTargetManager.d.ts +40 -0
- package/core/sdk/CompilerSourceMappingContentProvider.d.ts +12 -0
- package/core/sdk/Connections.d.ts +36 -0
- package/core/sdk/ConsoleModel.d.ts +127 -0
- package/core/sdk/ConsoleModelTypes.d.ts +6 -0
- package/core/sdk/Cookie.d.ts +68 -0
- package/core/sdk/CookieModel.d.ts +31 -0
- package/core/sdk/CookieParser.d.ts +14 -0
- package/core/sdk/CrashReportContextModel.d.ts +8 -0
- package/core/sdk/DOMDebuggerModel.d.ts +127 -0
- package/core/sdk/DOMModel.d.ts +436 -0
- package/core/sdk/DOMStorageModel.d.ts +79 -0
- package/core/sdk/DebuggerModel.d.ts +272 -0
- package/core/sdk/EmulationModel.d.ts +95 -0
- package/core/sdk/EnhancedTracesParser.d.ts +105 -0
- package/core/sdk/EventBreakpointsModel.d.ts +66 -0
- package/core/sdk/FrameAssociated.d.ts +6 -0
- package/core/sdk/FrameManager.d.ts +68 -0
- package/core/sdk/HeapProfilerModel.d.ts +75 -0
- package/core/sdk/HttpReasonPhraseStrings.d.ts +5 -0
- package/core/sdk/IOModel.d.ts +10 -0
- package/core/sdk/IsolateManager.d.ts +53 -0
- package/core/sdk/IssuesModel.d.ts +28 -0
- package/core/sdk/LayerTreeBase.d.ts +70 -0
- package/core/sdk/LogModel.d.ts +20 -0
- package/core/sdk/NetworkManager.d.ts +418 -0
- package/core/sdk/NetworkRequest.d.ts +469 -0
- package/core/sdk/NetworkRequestAccess.d.ts +91 -0
- package/core/sdk/OverlayColorGenerator.d.ts +14 -0
- package/core/sdk/OverlayModel.d.ts +186 -0
- package/core/sdk/OverlayPersistentHighlighter.d.ts +116 -0
- package/core/sdk/PageFunctions.d.ts +22 -0
- package/core/sdk/PageLoad.d.ts +14 -0
- package/core/sdk/PageResourceLoader.d.ts +111 -0
- package/core/sdk/PaintProfiler.d.ts +43 -0
- package/core/sdk/PerformanceMetricsModel.d.ts +12 -0
- package/core/sdk/PreloadingModel.d.ts +146 -0
- package/core/sdk/RehydratingConnection.d.ts +73 -0
- package/core/sdk/RehydratingObject.d.ts +59 -0
- package/core/sdk/RemoteObject.d.ts +210 -0
- package/core/sdk/Resource.d.ts +36 -0
- package/core/sdk/ResourceTreeModel.d.ts +278 -0
- package/core/sdk/RuntimeModel.d.ts +163 -0
- package/core/sdk/SDKModel.d.ts +30 -0
- package/core/sdk/SDKSettings.d.ts +53 -0
- package/core/sdk/ScopeTreeCache.d.ts +21 -0
- package/core/sdk/ScreenCaptureModel.d.ts +69 -0
- package/core/sdk/Script.d.ts +134 -0
- package/core/sdk/SecurityOrigin.d.ts +108 -0
- package/core/sdk/SecurityOriginManager.d.ts +23 -0
- package/core/sdk/ServerSentEvents.d.ts +18 -0
- package/core/sdk/ServerSentEventsProtocol.d.ts +18 -0
- package/core/sdk/ServerTiming.d.ts +24 -0
- package/core/sdk/ServiceWorkerCacheModel.d.ts +71 -0
- package/core/sdk/ServiceWorkerManager.d.ts +125 -0
- package/core/sdk/SourceMap.d.ts +197 -0
- package/core/sdk/SourceMapCache.d.ts +12 -0
- package/core/sdk/SourceMapFunctionRanges.d.ts +26 -0
- package/core/sdk/SourceMapManager.d.ts +46 -0
- package/core/sdk/SourceMapRangeMappings.d.ts +15 -0
- package/core/sdk/SourceMapScopeChainEntry.d.ts +23 -0
- package/core/sdk/SourceMapScopesInfo.d.ts +109 -0
- package/core/sdk/StorageBucketsModel.d.ts +48 -0
- package/core/sdk/StorageKeyManager.d.ts +38 -0
- package/core/sdk/Target.d.ts +79 -0
- package/core/sdk/TargetManager.d.ts +92 -0
- package/core/sdk/TraceObject.d.ts +43 -0
- package/core/sdk/WebAuthnModel.d.ts +29 -0
- package/core/sdk/sdk.d.ts +97 -1
- package/core/text_utils/CodeMirrorUtils.d.ts +3 -0
- package/core/text_utils/ContentData.d.ts +94 -0
- package/core/text_utils/ContentProvider.d.ts +42 -0
- package/core/text_utils/StaticContentProvider.d.ts +13 -0
- package/core/text_utils/StreamingContentData.d.ts +49 -0
- package/core/text_utils/Text.d.ts +19 -0
- package/core/text_utils/TextCursor.d.ts +9 -0
- package/core/text_utils/TextRange.d.ts +81 -0
- package/core/text_utils/TextUtils.d.ts +97 -0
- package/core/text_utils/WasmDisassembly.d.ts +29 -0
- package/core/text_utils/text_utils.d.ts +11 -0
- package/entrypoints/formatter_actions/formatter_actions.d.ts +48 -0
- package/generated/InspectorBackendCommands.d.ts +14 -0
- package/generated/SupportedCSSProperties.d.ts +18 -0
- package/generated/protocol-mapping.d.ts +5930 -0
- package/generated/protocol-proxy-api.d.ts +5396 -0
- package/generated/protocol.d.ts +26 -72
- package/index.d.ts +2 -0
- package/index.js +6 -0
- package/locales/af.json +171 -174
- package/locales/am.json +351 -354
- package/locales/ar.json +352 -355
- package/locales/as.json +350 -353
- package/locales/az.json +341 -344
- package/locales/be.json +351 -354
- package/locales/bg.json +351 -354
- package/locales/bn.json +351 -354
- package/locales/bs.json +253 -256
- package/locales/ca.json +283 -286
- package/locales/cs.json +336 -339
- package/locales/cy.json +144 -147
- package/locales/da.json +232 -235
- package/locales/de.json +251 -254
- package/locales/el.json +336 -339
- package/locales/en-GB.json +132 -135
- package/locales/en-US.json +294 -297
- package/locales/es-419.json +282 -285
- package/locales/es.json +282 -285
- package/locales/et.json +236 -239
- package/locales/eu.json +131 -134
- package/locales/fa.json +351 -354
- package/locales/fi.json +283 -286
- package/locales/fil.json +128 -131
- package/locales/fr-CA.json +310 -313
- package/locales/fr.json +309 -312
- package/locales/gl.json +264 -267
- package/locales/gu.json +352 -355
- package/locales/he.json +352 -355
- package/locales/hi.json +336 -339
- package/locales/hr.json +257 -260
- package/locales/hu.json +342 -345
- package/locales/hy.json +351 -354
- package/locales/id.json +128 -131
- package/locales/is.json +304 -307
- package/locales/it.json +221 -224
- package/locales/ja.json +351 -354
- package/locales/ka.json +352 -355
- package/locales/kk.json +352 -355
- package/locales/km.json +351 -354
- package/locales/kn.json +352 -355
- package/locales/ko.json +351 -354
- package/locales/ky.json +350 -353
- package/locales/lo.json +352 -355
- package/locales/lt.json +323 -326
- package/locales/lv.json +317 -320
- package/locales/mk.json +352 -355
- package/locales/ml.json +351 -354
- package/locales/mn.json +351 -354
- package/locales/mr.json +351 -354
- package/locales/ms.json +128 -131
- package/locales/my.json +350 -353
- package/locales/ne.json +336 -339
- package/locales/nl.json +183 -186
- package/locales/no.json +238 -241
- package/locales/or.json +351 -354
- package/locales/pa.json +351 -354
- package/locales/pl.json +307 -310
- package/locales/pt-PT.json +273 -276
- package/locales/pt.json +270 -273
- package/locales/ro.json +309 -312
- package/locales/ru.json +351 -354
- package/locales/si.json +352 -355
- package/locales/sk.json +333 -336
- package/locales/sl.json +273 -276
- package/locales/sq.json +316 -319
- package/locales/sr-Latn.json +256 -259
- package/locales/sr.json +352 -355
- package/locales/sv.json +296 -299
- package/locales/sw.json +128 -131
- package/locales/ta.json +352 -355
- package/locales/te.json +350 -353
- package/locales/th.json +352 -355
- package/locales/tr.json +327 -330
- package/locales/uk.json +351 -354
- package/locales/ur.json +352 -355
- package/locales/uz.json +232 -235
- package/locales/vi.json +352 -355
- package/locales/zh-HK.json +352 -355
- package/locales/zh-TW.json +351 -354
- package/locales/zh.json +351 -354
- package/locales/zu.json +127 -130
- package/models/crux-manager/CrUXManager.d.ts +107 -0
- package/models/crux-manager/crux-manager.d.ts +1 -0
- package/models/emulation/DeviceModeModel.d.ts +156 -0
- package/models/emulation/EmulatedDevices.d.ts +148 -0
- package/models/emulation/emulation.d.ts +3 -0
- package/models/formatter/FormatterWorkerPool.d.ts +58 -0
- package/models/formatter/ScriptFormatter.d.ts +11 -0
- package/models/formatter/formatter.d.ts +3 -0
- package/models/trace/ModelImpl.d.ts +1 -1
- package/models/trace/extras/extras.d.ts +2 -7
- package/models/trace/handlers/ScriptsHandler.d.ts +2 -2
- package/models/trace/insights/CLSCulprits.d.ts +14 -14
- package/models/trace/insights/Cache.d.ts +8 -8
- package/models/trace/insights/CharacterSet.d.ts +10 -10
- package/models/trace/insights/Common.d.ts +4 -4
- package/models/trace/insights/DOMSize.d.ts +15 -15
- package/models/trace/insights/DocumentLatency.d.ts +13 -13
- package/models/trace/insights/DuplicatedJavaScript.d.ts +7 -7
- package/models/trace/insights/FontDisplay.d.ts +7 -7
- package/models/trace/insights/ForcedReflow.d.ts +9 -9
- package/models/trace/insights/INPBreakdown.d.ts +10 -10
- package/models/trace/insights/ImageDelivery.d.ts +12 -13
- package/models/trace/insights/LCPBreakdown.d.ts +13 -13
- package/models/trace/insights/LCPDiscovery.d.ts +12 -12
- package/models/trace/insights/LegacyJavaScript.d.ts +7 -7
- package/models/trace/insights/ModernHTTP.d.ts +7 -7
- package/models/trace/insights/NetworkDependencyTree.d.ts +21 -104
- package/models/trace/insights/RenderBlocking.d.ts +7 -7
- package/models/trace/insights/SlowCSSSelector.d.ts +12 -12
- package/models/trace/insights/ThirdParties.d.ts +8 -8
- package/models/trace/insights/Viewport.d.ts +5 -5
- package/models/trace/insights/types.d.ts +1 -1
- package/models/trace/lantern/core/NetworkAnalyzer.d.ts +0 -1
- package/models/trace/lantern/graph/BaseNode.d.ts +2 -2
- package/models/trace/lantern/graph/CPUNode.d.ts +2 -4
- package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
- package/models/trace/lantern/types/Lantern.d.ts +19 -27
- package/models/trace/trace.js +544 -16
- package/models/trace/types/Configuration.d.ts +1 -1
- package/models/trace/types/Extensions.d.ts +1 -1
- package/models/trace/types/File.d.ts +5 -5
- package/models/trace/types/TraceEvents.d.ts +24 -24
- package/package.json +37 -8
- package/third_party/codemirror.next/codemirror.next.d.ts +9196 -0
- package/third_party/i18n/i18n-impl.d.ts +25 -0
- package/third_party/i18n/i18n.d.ts +3 -0
- package/third_party/i18n/localized-string-set.d.ts +49 -0
- package/third_party/intl-messageformat/intl-messageformat.d.ts +1 -0
- package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +67 -0
- package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +38 -0
- package/third_party/source-map-scopes-codec/package/src/codec.d.ts +48 -0
- package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +31 -0
- package/third_party/source-map-scopes-codec/package/src/encode/encode.d.ts +8 -0
- package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +6 -0
- package/third_party/source-map-scopes-codec/package/src/mod.d.ts +5 -0
- package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +168 -0
- package/third_party/source-map-scopes-codec/package/src/util.d.ts +5 -0
- package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +14 -0
- package/third_party/source-map-scopes-codec/source-map-scopes-codec.d.ts +1 -0
- package/third_party/third-party-web/lib/nostats-subset.d.ts +2 -0
- package/third_party/third-party-web/package/lib/index.d.ts +34 -0
- package/third_party/third-party-web/package/lib/subsets/nostats.d.ts +1 -0
- package/third_party/third-party-web/third-party-web.d.ts +2 -1
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts +0 -13
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/analyze-trace.d.mts +0 -17
- package/.tmp/tsbuildinfo/analyze-trace.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts +0 -4
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts.map +0 -1
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts +0 -2
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts +0 -3
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts.map +0 -1
- package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +0 -1
- package/analyze-inspector-issues.mjs +0 -60
- package/core/common/common.js +0 -1
- package/core/host/host.js +0 -1
- package/core/platform/ArrayUtilities.js +0 -224
- package/core/platform/ArrayUtilities.js.map +0 -1
- package/core/platform/Brand.js +0 -5
- package/core/platform/Brand.js.map +0 -1
- package/core/platform/Constructor.js +0 -5
- package/core/platform/Constructor.js.map +0 -1
- package/core/platform/DateUtilities.js +0 -14
- package/core/platform/DateUtilities.js.map +0 -1
- package/core/platform/DevToolsPath.js +0 -28
- package/core/platform/DevToolsPath.js.map +0 -1
- package/core/platform/HostRuntime.js +0 -31
- package/core/platform/HostRuntime.js.map +0 -1
- package/core/platform/KeyboardUtilities.js +0 -34
- package/core/platform/KeyboardUtilities.js.map +0 -1
- package/core/platform/MapUtilities.js +0 -80
- package/core/platform/MapUtilities.js.map +0 -1
- package/core/platform/MimeType.js +0 -157
- package/core/platform/MimeType.js.map +0 -1
- package/core/platform/NumberUtilities.js +0 -73
- package/core/platform/NumberUtilities.js.map +0 -1
- package/core/platform/Size.js +0 -36
- package/core/platform/Size.js.map +0 -1
- package/core/platform/StringUtilities.js +0 -731
- package/core/platform/StringUtilities.js.map +0 -1
- package/core/platform/Timing.js +0 -10
- package/core/platform/Timing.js.map +0 -1
- package/core/platform/TypedArrayUtilities.js +0 -158
- package/core/platform/TypedArrayUtilities.js.map +0 -1
- package/core/platform/TypescriptUtilities.js +0 -17
- package/core/platform/TypescriptUtilities.js.map +0 -1
- package/core/platform/UIString.js +0 -5
- package/core/platform/UIString.js.map +0 -1
- package/core/platform/UserVisibleError.js +0 -23
- package/core/platform/UserVisibleError.js.map +0 -1
- package/core/platform/api/HostRuntime.js +0 -5
- package/core/platform/api/HostRuntime.js.map +0 -1
- package/core/platform/api/api-tsconfig.json +0 -58
- package/core/platform/api/api-tsconfig.ref.json +0 -26
- package/core/platform/api/api.js +0 -6
- package/core/platform/api/api.js.map +0 -1
- package/core/platform/browser/HostRuntime.js +0 -165
- package/core/platform/browser/HostRuntime.js.map +0 -1
- package/core/platform/browser/browser-tsconfig.json +0 -59
- package/core/platform/browser/browser-tsconfig.ref.json +0 -27
- package/core/platform/browser/browser.js +0 -6
- package/core/platform/browser/browser.js.map +0 -1
- package/core/platform/browser/bundle-tsconfig.json +0 -59
- package/core/platform/browser/bundle-tsconfig.ref.json +0 -27
- package/core/platform/bundle-tsconfig.json +0 -59
- package/core/platform/bundle-tsconfig.ref.json +0 -27
- package/core/platform/foundation_unittests-tsconfig.json +0 -73
- package/core/platform/foundation_unittests-tsconfig.ref.json +0 -40
- package/core/platform/foundation_unittests_node_typecheck-tsconfig.json +0 -70
- package/core/platform/node/HostRuntime.js +0 -127
- package/core/platform/node/HostRuntime.js.map +0 -1
- package/core/platform/node/bundle-tsconfig.json +0 -59
- package/core/platform/node/bundle-tsconfig.ref.json +0 -27
- package/core/platform/node/node-tsconfig.json +0 -59
- package/core/platform/node/node-tsconfig.ref.json +0 -27
- package/core/platform/node/node.js +0 -6
- package/core/platform/node/node.js.map +0 -1
- package/core/platform/platform-tsconfig.json +0 -81
- package/core/platform/platform-tsconfig.ref.json +0 -49
- package/core/platform/platform.js +0 -28
- package/core/platform/platform.js.map +0 -1
- package/core/platform/platform_node_typecheck-tsconfig.json +0 -78
- package/core/platform/platform_node_typecheck.stamp +0 -0
- package/core/root/root.js +0 -1
- package/core/sdk/sdk.js +0 -1
- package/generated/protocol.js +0 -3304
- package/locales/en-XL.json +0 -1058
- package/models/cpu_profile/CPUProfileDataModel.js +0 -517
- package/models/cpu_profile/CPUProfileDataModel.js.map +0 -1
- package/models/cpu_profile/ProfileTreeModel.js +0 -90
- package/models/cpu_profile/ProfileTreeModel.js.map +0 -1
- package/models/cpu_profile/bundle-tsconfig.json +0 -59
- package/models/cpu_profile/bundle-tsconfig.ref.json +0 -27
- package/models/cpu_profile/cpu_profile-tsconfig.json +0 -63
- package/models/cpu_profile/cpu_profile-tsconfig.ref.json +0 -31
- package/models/cpu_profile/cpu_profile.js +0 -7
- package/models/cpu_profile/cpu_profile.js.map +0 -1
- package/models/cpu_profile/cpu_profile_node_typecheck-tsconfig.json +0 -60
- package/models/cpu_profile/cpu_profile_node_typecheck.stamp +0 -0
- package/models/cpu_profile/foundation_unittests-tsconfig.json +0 -63
- package/models/cpu_profile/foundation_unittests-tsconfig.ref.json +0 -30
- package/models/cpu_profile/foundation_unittests_node_typecheck-tsconfig.json +0 -60
- package/models/issues_manager/CheckFormsIssuesTrigger.d.ts +0 -1
- package/models/issues_manager/CheckFormsIssuesTrigger.js +0 -1
- package/models/issues_manager/ContrastCheckTrigger.d.ts +0 -1
- package/models/issues_manager/ContrastCheckTrigger.js +0 -1
- package/models/issues_manager/DeprecationIssue.d.ts +0 -1
- package/models/issues_manager/DeprecationIssue.js +0 -1
- package/models/issues_manager/IssueResolver.d.ts +0 -1
- package/models/issues_manager/IssueResolver.js +0 -1
- package/models/issues_manager/RelatedIssue.d.ts +0 -1
- package/models/issues_manager/RelatedIssue.js +0 -1
- package/models/issues_manager/SourceFrameIssuesManager.d.ts +0 -1
- package/models/issues_manager/SourceFrameIssuesManager.js +0 -1
- package/models/trace/EntityMapper.js +0 -133
- package/models/trace/EntityMapper.js.map +0 -1
- package/models/trace/EventsSerializer.js +0 -90
- package/models/trace/EventsSerializer.js.map +0 -1
- package/models/trace/LanternComputationData.js +0 -374
- package/models/trace/LanternComputationData.js.map +0 -1
- package/models/trace/LegacyTracingModel.d.ts +0 -1
- package/models/trace/LegacyTracingModel.js +0 -1
- package/models/trace/ModelImpl.js +0 -181
- package/models/trace/ModelImpl.js.map +0 -1
- package/models/trace/Name.js +0 -115
- package/models/trace/Name.js.map +0 -1
- package/models/trace/Processor.js +0 -618
- package/models/trace/Processor.js.map +0 -1
- package/models/trace/Styles.js +0 -836
- package/models/trace/Styles.js.map +0 -1
- package/models/trace/TracingManager.d.ts +0 -1
- package/models/trace/TracingManager.js +0 -1
- package/models/trace/bundle-tsconfig.json +0 -77
- package/models/trace/bundle-tsconfig.ref.json +0 -45
- package/models/trace/extras/FilmStrip.js +0 -45
- package/models/trace/extras/FilmStrip.js.map +0 -1
- package/models/trace/extras/Initiators.js +0 -47
- package/models/trace/extras/Initiators.js.map +0 -1
- package/models/trace/extras/MainThreadActivity.js +0 -77
- package/models/trace/extras/MainThreadActivity.js.map +0 -1
- package/models/trace/extras/ScriptDuplication.js +0 -163
- package/models/trace/extras/ScriptDuplication.js.map +0 -1
- package/models/trace/extras/StackTraceForEvent.js +0 -192
- package/models/trace/extras/StackTraceForEvent.js.map +0 -1
- package/models/trace/extras/ThirdParties.js +0 -119
- package/models/trace/extras/ThirdParties.js.map +0 -1
- package/models/trace/extras/TraceFilter.js +0 -51
- package/models/trace/extras/TraceFilter.js.map +0 -1
- package/models/trace/extras/TraceTree.js +0 -621
- package/models/trace/extras/TraceTree.js.map +0 -1
- package/models/trace/extras/bundle-tsconfig.json +0 -59
- package/models/trace/extras/bundle-tsconfig.ref.json +0 -27
- package/models/trace/extras/extras-tsconfig.json +0 -81
- package/models/trace/extras/extras-tsconfig.ref.json +0 -49
- package/models/trace/extras/extras.js +0 -13
- package/models/trace/extras/extras.js.map +0 -1
- package/models/trace/extras/extras_node_typecheck-tsconfig.json +0 -78
- package/models/trace/extras/extras_node_typecheck.stamp +0 -0
- package/models/trace/extras/foundation_unittests-tsconfig.json +0 -91
- package/models/trace/extras/foundation_unittests-tsconfig.ref.json +0 -58
- package/models/trace/extras/foundation_unittests_node_typecheck-tsconfig.json +0 -88
- package/models/trace/foundation_unittests-tsconfig.json +0 -70
- package/models/trace/foundation_unittests-tsconfig.ref.json +0 -37
- package/models/trace/foundation_unittests_node_typecheck-tsconfig.json +0 -67
- package/models/trace/handlers/AnimationFramesHandler.js +0 -110
- package/models/trace/handlers/AnimationFramesHandler.js.map +0 -1
- package/models/trace/handlers/AnimationHandler.js +0 -27
- package/models/trace/handlers/AnimationHandler.js.map +0 -1
- package/models/trace/handlers/AsyncJSCallsHandler.js +0 -188
- package/models/trace/handlers/AsyncJSCallsHandler.js.map +0 -1
- package/models/trace/handlers/DOMStatsHandler.js +0 -22
- package/models/trace/handlers/DOMStatsHandler.js.map +0 -1
- package/models/trace/handlers/ExtensionTraceDataHandler.js +0 -264
- package/models/trace/handlers/ExtensionTraceDataHandler.js.map +0 -1
- package/models/trace/handlers/FlowsHandler.js +0 -149
- package/models/trace/handlers/FlowsHandler.js.map +0 -1
- package/models/trace/handlers/FramesHandler.js +0 -491
- package/models/trace/handlers/FramesHandler.js.map +0 -1
- package/models/trace/handlers/GPUHandler.js +0 -36
- package/models/trace/handlers/GPUHandler.js.map +0 -1
- package/models/trace/handlers/ImagePaintingHandler.js +0 -148
- package/models/trace/handlers/ImagePaintingHandler.js.map +0 -1
- package/models/trace/handlers/InitiatorsHandler.js +0 -181
- package/models/trace/handlers/InitiatorsHandler.js.map +0 -1
- package/models/trace/handlers/InvalidationsHandler.js +0 -127
- package/models/trace/handlers/InvalidationsHandler.js.map +0 -1
- package/models/trace/handlers/LargestImagePaintHandler.js +0 -86
- package/models/trace/handlers/LargestImagePaintHandler.js.map +0 -1
- package/models/trace/handlers/LargestTextPaintHandler.js +0 -28
- package/models/trace/handlers/LargestTextPaintHandler.js.map +0 -1
- package/models/trace/handlers/LayerTreeHandler.js +0 -104
- package/models/trace/handlers/LayerTreeHandler.js.map +0 -1
- package/models/trace/handlers/LayoutShiftsHandler.js +0 -457
- package/models/trace/handlers/LayoutShiftsHandler.js.map +0 -1
- package/models/trace/handlers/MemoryHandler.js +0 -22
- package/models/trace/handlers/MemoryHandler.js.map +0 -1
- package/models/trace/handlers/MetaHandler.js +0 -442
- package/models/trace/handlers/MetaHandler.js.map +0 -1
- package/models/trace/handlers/ModelHandlers.js +0 -33
- package/models/trace/handlers/ModelHandlers.js.map +0 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +0 -578
- package/models/trace/handlers/NetworkRequestsHandler.js.map +0 -1
- package/models/trace/handlers/PageFramesHandler.js +0 -43
- package/models/trace/handlers/PageFramesHandler.js.map +0 -1
- package/models/trace/handlers/PageLoadMetricsHandler.js +0 -462
- package/models/trace/handlers/PageLoadMetricsHandler.js.map +0 -1
- package/models/trace/handlers/RendererHandler.js +0 -346
- package/models/trace/handlers/RendererHandler.js.map +0 -1
- package/models/trace/handlers/SamplesHandler.js +0 -261
- package/models/trace/handlers/SamplesHandler.js.map +0 -1
- package/models/trace/handlers/ScreenshotsHandler.js +0 -56
- package/models/trace/handlers/ScreenshotsHandler.js.map +0 -1
- package/models/trace/handlers/ScriptsHandler.js +0 -286
- package/models/trace/handlers/ScriptsHandler.js.map +0 -1
- package/models/trace/handlers/SelectorStatsHandler.js +0 -72
- package/models/trace/handlers/SelectorStatsHandler.js.map +0 -1
- package/models/trace/handlers/Threads.js +0 -108
- package/models/trace/handlers/Threads.js.map +0 -1
- package/models/trace/handlers/UserInteractionsHandler.js +0 -319
- package/models/trace/handlers/UserInteractionsHandler.js.map +0 -1
- package/models/trace/handlers/UserTimingsHandler.js +0 -194
- package/models/trace/handlers/UserTimingsHandler.js.map +0 -1
- package/models/trace/handlers/WarningsHandler.js +0 -135
- package/models/trace/handlers/WarningsHandler.js.map +0 -1
- package/models/trace/handlers/WorkersHandler.js +0 -34
- package/models/trace/handlers/WorkersHandler.js.map +0 -1
- package/models/trace/handlers/bundle-tsconfig.json +0 -59
- package/models/trace/handlers/bundle-tsconfig.ref.json +0 -27
- package/models/trace/handlers/foundation_unittests-tsconfig.json +0 -102
- package/models/trace/handlers/foundation_unittests-tsconfig.ref.json +0 -69
- package/models/trace/handlers/foundation_unittests_node_typecheck-tsconfig.json +0 -99
- package/models/trace/handlers/handlers-tsconfig.json +0 -112
- package/models/trace/handlers/handlers-tsconfig.ref.json +0 -80
- package/models/trace/handlers/handlers.js +0 -8
- package/models/trace/handlers/handlers.js.map +0 -1
- package/models/trace/handlers/handlers_node_typecheck-tsconfig.json +0 -109
- package/models/trace/handlers/handlers_node_typecheck.stamp +0 -0
- package/models/trace/handlers/helpers.js +0 -164
- package/models/trace/handlers/helpers.js.map +0 -1
- package/models/trace/handlers/types.js +0 -2
- package/models/trace/handlers/types.js.map +0 -1
- package/models/trace/helpers/Extensions.js +0 -42
- package/models/trace/helpers/Extensions.js.map +0 -1
- package/models/trace/helpers/Network.js +0 -103
- package/models/trace/helpers/Network.js.map +0 -1
- package/models/trace/helpers/SamplesIntegrator.js +0 -512
- package/models/trace/helpers/SamplesIntegrator.js.map +0 -1
- package/models/trace/helpers/SyntheticEvents.js +0 -94
- package/models/trace/helpers/SyntheticEvents.js.map +0 -1
- package/models/trace/helpers/Timing.js +0 -207
- package/models/trace/helpers/Timing.js.map +0 -1
- package/models/trace/helpers/Trace.js +0 -817
- package/models/trace/helpers/Trace.js.map +0 -1
- package/models/trace/helpers/TreeHelpers.js +0 -255
- package/models/trace/helpers/TreeHelpers.js.map +0 -1
- package/models/trace/helpers/bundle-tsconfig.json +0 -59
- package/models/trace/helpers/bundle-tsconfig.ref.json +0 -27
- package/models/trace/helpers/foundation_unittests-tsconfig.json +0 -73
- package/models/trace/helpers/foundation_unittests-tsconfig.ref.json +0 -40
- package/models/trace/helpers/foundation_unittests_node_typecheck-tsconfig.json +0 -70
- package/models/trace/helpers/helpers-tsconfig.json +0 -77
- package/models/trace/helpers/helpers-tsconfig.ref.json +0 -45
- package/models/trace/helpers/helpers.js +0 -11
- package/models/trace/helpers/helpers.js.map +0 -1
- package/models/trace/helpers/helpers_node_typecheck-tsconfig.json +0 -74
- package/models/trace/helpers/helpers_node_typecheck.stamp +0 -0
- package/models/trace/insights/CLSCulprits.js +0 -519
- package/models/trace/insights/CLSCulprits.js.map +0 -1
- package/models/trace/insights/Cache.js +0 -210
- package/models/trace/insights/Cache.js.map +0 -1
- package/models/trace/insights/CharacterSet.js +0 -132
- package/models/trace/insights/CharacterSet.js.map +0 -1
- package/models/trace/insights/Common.js +0 -366
- package/models/trace/insights/Common.js.map +0 -1
- package/models/trace/insights/DOMSize.js +0 -182
- package/models/trace/insights/DOMSize.js.map +0 -1
- package/models/trace/insights/DocumentLatency.js +0 -259
- package/models/trace/insights/DocumentLatency.js.map +0 -1
- package/models/trace/insights/DuplicatedJavaScript.js +0 -99
- package/models/trace/insights/DuplicatedJavaScript.js.map +0 -1
- package/models/trace/insights/FontDisplay.js +0 -93
- package/models/trace/insights/FontDisplay.js.map +0 -1
- package/models/trace/insights/ForcedReflow.js +0 -162
- package/models/trace/insights/ForcedReflow.js.map +0 -1
- package/models/trace/insights/INPBreakdown.js +0 -130
- package/models/trace/insights/INPBreakdown.js.map +0 -1
- package/models/trace/insights/ImageDelivery.js +0 -264
- package/models/trace/insights/ImageDelivery.js.map +0 -1
- package/models/trace/insights/LCPBreakdown.js +0 -200
- package/models/trace/insights/LCPBreakdown.js.map +0 -1
- package/models/trace/insights/LCPDiscovery.js +0 -190
- package/models/trace/insights/LCPDiscovery.js.map +0 -1
- package/models/trace/insights/LegacyJavaScript.js +0 -99
- package/models/trace/insights/LegacyJavaScript.js.map +0 -1
- package/models/trace/insights/Models.js +0 -23
- package/models/trace/insights/Models.js.map +0 -1
- package/models/trace/insights/ModernHTTP.js +0 -205
- package/models/trace/insights/ModernHTTP.js.map +0 -1
- package/models/trace/insights/NetworkDependencyTree.js +0 -972
- package/models/trace/insights/NetworkDependencyTree.js.map +0 -1
- package/models/trace/insights/RenderBlocking.js +0 -191
- package/models/trace/insights/RenderBlocking.js.map +0 -1
- package/models/trace/insights/SlowCSSSelector.js +0 -140
- package/models/trace/insights/SlowCSSSelector.js.map +0 -1
- package/models/trace/insights/Statistics.js +0 -93
- package/models/trace/insights/Statistics.js.map +0 -1
- package/models/trace/insights/ThirdParties.js +0 -110
- package/models/trace/insights/ThirdParties.js.map +0 -1
- package/models/trace/insights/Viewport.js +0 -105
- package/models/trace/insights/Viewport.js.map +0 -1
- package/models/trace/insights/bundle-tsconfig.json +0 -59
- package/models/trace/insights/bundle-tsconfig.ref.json +0 -27
- package/models/trace/insights/foundation_unittests-tsconfig.json +0 -98
- package/models/trace/insights/foundation_unittests-tsconfig.ref.json +0 -65
- package/models/trace/insights/foundation_unittests_node_typecheck-tsconfig.json +0 -95
- package/models/trace/insights/insights-tsconfig.json +0 -114
- package/models/trace/insights/insights-tsconfig.ref.json +0 -82
- package/models/trace/insights/insights.js +0 -10
- package/models/trace/insights/insights.js.map +0 -1
- package/models/trace/insights/insights_node_typecheck-tsconfig.json +0 -111
- package/models/trace/insights/insights_node_typecheck.stamp +0 -0
- package/models/trace/insights/types.js +0 -41
- package/models/trace/insights/types.js.map +0 -1
- package/models/trace/lantern/bundle-tsconfig.json +0 -71
- package/models/trace/lantern/bundle-tsconfig.ref.json +0 -39
- package/models/trace/lantern/core/LanternError.js +0 -7
- package/models/trace/lantern/core/LanternError.js.map +0 -1
- package/models/trace/lantern/core/NetworkAnalyzer.js +0 -488
- package/models/trace/lantern/core/NetworkAnalyzer.js.map +0 -1
- package/models/trace/lantern/core/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/core/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/core/core-tsconfig.json +0 -60
- package/models/trace/lantern/core/core-tsconfig.ref.json +0 -28
- package/models/trace/lantern/core/core.js +0 -6
- package/models/trace/lantern/core/core.js.map +0 -1
- package/models/trace/lantern/core/core_node_typecheck-tsconfig.json +0 -57
- package/models/trace/lantern/core/core_node_typecheck.stamp +0 -0
- package/models/trace/lantern/core/foundation_unittests-tsconfig.json +0 -69
- package/models/trace/lantern/core/foundation_unittests-tsconfig.ref.json +0 -36
- package/models/trace/lantern/core/foundation_unittests_node_typecheck-tsconfig.json +0 -66
- package/models/trace/lantern/graph/BaseNode.js +0 -277
- package/models/trace/lantern/graph/BaseNode.js.map +0 -1
- package/models/trace/lantern/graph/CPUNode.js +0 -80
- package/models/trace/lantern/graph/CPUNode.js.map +0 -1
- package/models/trace/lantern/graph/NetworkNode.js +0 -95
- package/models/trace/lantern/graph/NetworkNode.js.map +0 -1
- package/models/trace/lantern/graph/PageDependencyGraph.js +0 -574
- package/models/trace/lantern/graph/PageDependencyGraph.js.map +0 -1
- package/models/trace/lantern/graph/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/graph/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.json +0 -61
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.ref.json +0 -28
- package/models/trace/lantern/graph/foundation_unittests_node_typecheck-tsconfig.json +0 -58
- package/models/trace/lantern/graph/graph-tsconfig.json +0 -65
- package/models/trace/lantern/graph/graph-tsconfig.ref.json +0 -33
- package/models/trace/lantern/graph/graph.js +0 -8
- package/models/trace/lantern/graph/graph.js.map +0 -1
- package/models/trace/lantern/graph/graph_node_typecheck-tsconfig.json +0 -62
- package/models/trace/lantern/graph/graph_node_typecheck.stamp +0 -0
- package/models/trace/lantern/lantern.js +0 -10
- package/models/trace/lantern/lantern.js.map +0 -1
- package/models/trace/lantern/metrics/FirstContentfulPaint.js +0 -137
- package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +0 -1
- package/models/trace/lantern/metrics/Interactive.js +0 -68
- package/models/trace/lantern/metrics/Interactive.js.map +0 -1
- package/models/trace/lantern/metrics/LargestContentfulPaint.js +0 -69
- package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +0 -1
- package/models/trace/lantern/metrics/MaxPotentialFID.js +0 -49
- package/models/trace/lantern/metrics/MaxPotentialFID.js.map +0 -1
- package/models/trace/lantern/metrics/Metric.js +0 -69
- package/models/trace/lantern/metrics/Metric.js.map +0 -1
- package/models/trace/lantern/metrics/SpeedIndex.js +0 -102
- package/models/trace/lantern/metrics/SpeedIndex.js.map +0 -1
- package/models/trace/lantern/metrics/TBTUtils.js +0 -65
- package/models/trace/lantern/metrics/TBTUtils.js.map +0 -1
- package/models/trace/lantern/metrics/TotalBlockingTime.js +0 -79
- package/models/trace/lantern/metrics/TotalBlockingTime.js.map +0 -1
- package/models/trace/lantern/metrics/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/metrics/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.json +0 -76
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.ref.json +0 -43
- package/models/trace/lantern/metrics/foundation_unittests_node_typecheck-tsconfig.json +0 -73
- package/models/trace/lantern/metrics/metrics-tsconfig.json +0 -75
- package/models/trace/lantern/metrics/metrics-tsconfig.ref.json +0 -43
- package/models/trace/lantern/metrics/metrics.js +0 -12
- package/models/trace/lantern/metrics/metrics.js.map +0 -1
- package/models/trace/lantern/metrics/metrics_node_typecheck-tsconfig.json +0 -72
- package/models/trace/lantern/metrics/metrics_node_typecheck.stamp +0 -0
- package/models/trace/lantern/simulation/ConnectionPool.js +0 -116
- package/models/trace/lantern/simulation/ConnectionPool.js.map +0 -1
- package/models/trace/lantern/simulation/Constants.js +0 -45
- package/models/trace/lantern/simulation/Constants.js.map +0 -1
- package/models/trace/lantern/simulation/DNSCache.js +0 -48
- package/models/trace/lantern/simulation/DNSCache.js.map +0 -1
- package/models/trace/lantern/simulation/SimulationTimingMap.js +0 -135
- package/models/trace/lantern/simulation/SimulationTimingMap.js.map +0 -1
- package/models/trace/lantern/simulation/Simulator.js +0 -455
- package/models/trace/lantern/simulation/Simulator.js.map +0 -1
- package/models/trace/lantern/simulation/TCPConnection.js +0 -155
- package/models/trace/lantern/simulation/TCPConnection.js.map +0 -1
- package/models/trace/lantern/simulation/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/simulation/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.json +0 -75
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.ref.json +0 -42
- package/models/trace/lantern/simulation/foundation_unittests_node_typecheck-tsconfig.json +0 -72
- package/models/trace/lantern/simulation/simulation-tsconfig.json +0 -70
- package/models/trace/lantern/simulation/simulation-tsconfig.ref.json +0 -38
- package/models/trace/lantern/simulation/simulation.js +0 -10
- package/models/trace/lantern/simulation/simulation.js.map +0 -1
- package/models/trace/lantern/simulation/simulation_node_typecheck-tsconfig.json +0 -67
- package/models/trace/lantern/simulation/simulation_node_typecheck.stamp +0 -0
- package/models/trace/lantern/testing/bundle-tsconfig.json +0 -60
- package/models/trace/lantern/testing/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/testing/testing-tsconfig.json +0 -63
- package/models/trace/lantern/testing/testing-tsconfig.ref.json +0 -30
- package/models/trace/lantern/types/Lantern.js +0 -25
- package/models/trace/lantern/types/Lantern.js.map +0 -1
- package/models/trace/lantern/types/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/types/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/types/types-tsconfig.json +0 -59
- package/models/trace/lantern/types/types-tsconfig.ref.json +0 -27
- package/models/trace/lantern/types/types.js +0 -5
- package/models/trace/lantern/types/types.js.map +0 -1
- package/models/trace/lantern/types/types_node_typecheck-tsconfig.json +0 -56
- package/models/trace/lantern/types/types_node_typecheck.stamp +0 -0
- package/models/trace/trace-tsconfig.json +0 -89
- package/models/trace/trace-tsconfig.ref.json +0 -57
- package/models/trace/trace.js.map +0 -1
- package/models/trace/trace_node_typecheck-tsconfig.json +0 -86
- package/models/trace/trace_node_typecheck.stamp +0 -0
- package/models/trace/types/Configuration.js +0 -19
- package/models/trace/types/Configuration.js.map +0 -1
- package/models/trace/types/Extensions.js +0 -38
- package/models/trace/types/Extensions.js.map +0 -1
- package/models/trace/types/File.js +0 -82
- package/models/trace/types/File.js.map +0 -1
- package/models/trace/types/Overlays.js +0 -5
- package/models/trace/types/Overlays.js.map +0 -1
- package/models/trace/types/Timing.js +0 -16
- package/models/trace/types/Timing.js.map +0 -1
- package/models/trace/types/TraceEvents.js +0 -986
- package/models/trace/types/TraceEvents.js.map +0 -1
- package/models/trace/types/bundle-tsconfig.json +0 -59
- package/models/trace/types/bundle-tsconfig.ref.json +0 -27
- package/models/trace/types/foundation_unittests-tsconfig.json +0 -67
- package/models/trace/types/foundation_unittests-tsconfig.ref.json +0 -34
- package/models/trace/types/foundation_unittests_node_typecheck-tsconfig.json +0 -64
- package/models/trace/types/types-tsconfig.json +0 -76
- package/models/trace/types/types-tsconfig.ref.json +0 -44
- package/models/trace/types/types.js +0 -10
- package/models/trace/types/types.js.map +0 -1
- package/models/trace/types/types_node_typecheck-tsconfig.json +0 -73
- package/models/trace/types/types_node_typecheck.stamp +0 -0
- package/test/invalid-animation-events.json.gz +0 -0
- package/test/test-trace-engine.mjs +0 -191
- package/third_party/legacy-javascript/bundle-tsconfig.json +0 -59
- package/third_party/legacy-javascript/bundle-tsconfig.ref.json +0 -27
- package/third_party/legacy-javascript/legacy-javascript-tsconfig.ref.json +0 -15
- package/third_party/legacy-javascript/legacy-javascript.js +0 -3
- package/third_party/legacy-javascript/legacy-javascript.js.map +0 -1
- package/third_party/legacy-javascript/lib/legacy-javascript.js +0 -1119
- package/third_party/marked/marked.d.ts +0 -1
- package/third_party/marked/marked.js +0 -1
- package/third_party/third-party-web/third-party-web.js +0 -1
- package/tsconfig.json +0 -29
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": false,
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"checkJs": false,
|
|
6
|
-
"composite": false,
|
|
7
|
-
"declaration": false,
|
|
8
|
-
"disableSourceOfProjectReferenceRedirect": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"incremental": false,
|
|
12
|
-
"inlineSources": true,
|
|
13
|
-
"lib": [
|
|
14
|
-
"ES2023",
|
|
15
|
-
"ES2024.Promise",
|
|
16
|
-
"ESNext.Iterator",
|
|
17
|
-
"ESNext.Collection",
|
|
18
|
-
"ESNext.Array"
|
|
19
|
-
],
|
|
20
|
-
"module": "esnext",
|
|
21
|
-
"moduleResolution": "bundler",
|
|
22
|
-
"noEmit": true,
|
|
23
|
-
"noEmitOnError": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true,
|
|
25
|
-
"noImplicitOverride": true,
|
|
26
|
-
"noImplicitReturns": true,
|
|
27
|
-
"outDir": ".",
|
|
28
|
-
"preserveConstEnums": true,
|
|
29
|
-
"rootDir": "../../../../../../../front_end/models/trace/extras",
|
|
30
|
-
"rootDirs": [
|
|
31
|
-
"../../../../../../../",
|
|
32
|
-
"../../../../"
|
|
33
|
-
],
|
|
34
|
-
"skipLibCheck": true,
|
|
35
|
-
"sourceMap": true,
|
|
36
|
-
"strict": true,
|
|
37
|
-
"target": "es2023",
|
|
38
|
-
"typeRoots": [
|
|
39
|
-
"../../../../../../../node_modules/@types",
|
|
40
|
-
"../../../../../../../node_modules"
|
|
41
|
-
],
|
|
42
|
-
"types": [
|
|
43
|
-
"mocha",
|
|
44
|
-
"node",
|
|
45
|
-
"undici-types"
|
|
46
|
-
],
|
|
47
|
-
"useUnknownInCatchVariables": false
|
|
48
|
-
},
|
|
49
|
-
"files": [
|
|
50
|
-
"../../../../../../../front_end/models/trace/extras/FilmStrip.test.ts",
|
|
51
|
-
"../../../../../../../front_end/models/trace/extras/Initiators.test.ts",
|
|
52
|
-
"../../../../../../../front_end/models/trace/extras/MainThreadActivity.test.ts",
|
|
53
|
-
"../../../../../../../front_end/models/trace/extras/ScriptDuplication.test.ts",
|
|
54
|
-
"../../../../../../../front_end/models/trace/extras/StackTraceForEvent.test.ts",
|
|
55
|
-
"../../../../../../../front_end/models/trace/extras/ThirdParties.test.ts",
|
|
56
|
-
"../../../../../../../front_end/models/trace/extras/TraceFilter.test.ts",
|
|
57
|
-
"../../../../../../../front_end/models/trace/extras/TraceTree.test.ts"
|
|
58
|
-
],
|
|
59
|
-
"references": [
|
|
60
|
-
{
|
|
61
|
-
"path": "bundle-tsconfig.ref.json"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "../../../core/common/bundle-tsconfig.ref.json"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"path": "../../../core/platform/bundle-tsconfig.ref.json"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "../../../core/sdk/bundle-tsconfig.ref.json"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"path": "../../../generated/generated-tsconfig.ref.json"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"path": "../bundle-tsconfig.ref.json"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"path": "../../../testing/testing-tsconfig.ref.json"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"path": "../handlers/bundle-tsconfig.ref.json"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"path": "../types/bundle-tsconfig.ref.json"
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": false,
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"checkJs": false,
|
|
6
|
-
"composite": false,
|
|
7
|
-
"declaration": false,
|
|
8
|
-
"disableSourceOfProjectReferenceRedirect": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"incremental": false,
|
|
12
|
-
"inlineSources": true,
|
|
13
|
-
"lib": [
|
|
14
|
-
"dom",
|
|
15
|
-
"dom.iterable",
|
|
16
|
-
"ES2023",
|
|
17
|
-
"ES2024.Promise",
|
|
18
|
-
"ESNext.Iterator",
|
|
19
|
-
"ESNext.Collection",
|
|
20
|
-
"ESNext.Array"
|
|
21
|
-
],
|
|
22
|
-
"module": "esnext",
|
|
23
|
-
"moduleResolution": "bundler",
|
|
24
|
-
"noEmitOnError": true,
|
|
25
|
-
"noFallthroughCasesInSwitch": true,
|
|
26
|
-
"noImplicitOverride": true,
|
|
27
|
-
"noImplicitReturns": true,
|
|
28
|
-
"outDir": ".",
|
|
29
|
-
"preserveConstEnums": true,
|
|
30
|
-
"rootDir": "../../../../../../front_end/models/trace",
|
|
31
|
-
"rootDirs": [
|
|
32
|
-
"../../../../../../",
|
|
33
|
-
"../../../"
|
|
34
|
-
],
|
|
35
|
-
"skipLibCheck": true,
|
|
36
|
-
"sourceMap": true,
|
|
37
|
-
"strict": true,
|
|
38
|
-
"target": "es2023",
|
|
39
|
-
"typeRoots": [
|
|
40
|
-
"../../../../../../node_modules/@types",
|
|
41
|
-
"../../../../../../node_modules"
|
|
42
|
-
],
|
|
43
|
-
"types": [
|
|
44
|
-
"mocha"
|
|
45
|
-
],
|
|
46
|
-
"useUnknownInCatchVariables": false
|
|
47
|
-
},
|
|
48
|
-
"files": [
|
|
49
|
-
"../../../../../../front_end/models/trace/EntityMapper.test.ts",
|
|
50
|
-
"../../../../../../front_end/models/trace/EventsSerializer.test.ts",
|
|
51
|
-
"../../../../../../front_end/models/trace/ModelImpl.test.ts",
|
|
52
|
-
"../../../../../../front_end/models/trace/Name.test.ts",
|
|
53
|
-
"../../../../../../front_end/models/trace/Processor.test.ts",
|
|
54
|
-
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
55
|
-
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
56
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts",
|
|
57
|
-
"../../../../../../node_modules/@types/filewriter/index.d.ts"
|
|
58
|
-
],
|
|
59
|
-
"references": [
|
|
60
|
-
{
|
|
61
|
-
"path": "bundle-tsconfig.ref.json"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "../../testing/testing-tsconfig.ref.json"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"path": "../cpu_profile/bundle-tsconfig.ref.json"
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"declarationDir": ".",
|
|
6
|
-
"emitDeclarationOnly": true,
|
|
7
|
-
"outDir": ".",
|
|
8
|
-
"rootDir": "../../../../../../front_end/models/trace",
|
|
9
|
-
"rootDirs": [
|
|
10
|
-
"../../../../../../",
|
|
11
|
-
"../../../"
|
|
12
|
-
],
|
|
13
|
-
"skipLibCheck": true
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"../../../../../../front_end/models/trace/EntityMapper.test.ts",
|
|
17
|
-
"../../../../../../front_end/models/trace/EventsSerializer.test.ts",
|
|
18
|
-
"../../../../../../front_end/models/trace/ModelImpl.test.ts",
|
|
19
|
-
"../../../../../../front_end/models/trace/Name.test.ts",
|
|
20
|
-
"../../../../../../front_end/models/trace/Processor.test.ts",
|
|
21
|
-
"../../../../../../front_end/legacy/legacy-defs.d.ts",
|
|
22
|
-
"../../../../../../front_end/global_typings/global_defs.d.ts",
|
|
23
|
-
"../../../../../../node_modules/@types/filesystem/index.d.ts",
|
|
24
|
-
"../../../../../../node_modules/@types/filewriter/index.d.ts"
|
|
25
|
-
],
|
|
26
|
-
"references": [
|
|
27
|
-
{
|
|
28
|
-
"path": "bundle-tsconfig.ref.json"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "../../testing/testing-tsconfig.ref.json"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "../cpu_profile/bundle-tsconfig.ref.json"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": false,
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"checkJs": false,
|
|
6
|
-
"composite": false,
|
|
7
|
-
"declaration": false,
|
|
8
|
-
"disableSourceOfProjectReferenceRedirect": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"incremental": false,
|
|
12
|
-
"inlineSources": true,
|
|
13
|
-
"lib": [
|
|
14
|
-
"ES2023",
|
|
15
|
-
"ES2024.Promise",
|
|
16
|
-
"ESNext.Iterator",
|
|
17
|
-
"ESNext.Collection",
|
|
18
|
-
"ESNext.Array"
|
|
19
|
-
],
|
|
20
|
-
"module": "esnext",
|
|
21
|
-
"moduleResolution": "bundler",
|
|
22
|
-
"noEmit": true,
|
|
23
|
-
"noEmitOnError": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true,
|
|
25
|
-
"noImplicitOverride": true,
|
|
26
|
-
"noImplicitReturns": true,
|
|
27
|
-
"outDir": ".",
|
|
28
|
-
"preserveConstEnums": true,
|
|
29
|
-
"rootDir": "../../../../../../front_end/models/trace",
|
|
30
|
-
"rootDirs": [
|
|
31
|
-
"../../../../../../",
|
|
32
|
-
"../../../"
|
|
33
|
-
],
|
|
34
|
-
"skipLibCheck": true,
|
|
35
|
-
"sourceMap": true,
|
|
36
|
-
"strict": true,
|
|
37
|
-
"target": "es2023",
|
|
38
|
-
"typeRoots": [
|
|
39
|
-
"../../../../../../node_modules/@types",
|
|
40
|
-
"../../../../../../node_modules"
|
|
41
|
-
],
|
|
42
|
-
"types": [
|
|
43
|
-
"mocha",
|
|
44
|
-
"node",
|
|
45
|
-
"undici-types"
|
|
46
|
-
],
|
|
47
|
-
"useUnknownInCatchVariables": false
|
|
48
|
-
},
|
|
49
|
-
"files": [
|
|
50
|
-
"../../../../../../front_end/models/trace/EntityMapper.test.ts",
|
|
51
|
-
"../../../../../../front_end/models/trace/EventsSerializer.test.ts",
|
|
52
|
-
"../../../../../../front_end/models/trace/ModelImpl.test.ts",
|
|
53
|
-
"../../../../../../front_end/models/trace/Name.test.ts",
|
|
54
|
-
"../../../../../../front_end/models/trace/Processor.test.ts"
|
|
55
|
-
],
|
|
56
|
-
"references": [
|
|
57
|
-
{
|
|
58
|
-
"path": "bundle-tsconfig.ref.json"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"path": "../../testing/testing-tsconfig.ref.json"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "../cpu_profile/bundle-tsconfig.ref.json"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
import * as Helpers from '../helpers/helpers.js';
|
|
5
|
-
import * as Types from '../types/types.js';
|
|
6
|
-
function threadKey(data) {
|
|
7
|
-
return `${data.pid}-${data.tid}`;
|
|
8
|
-
}
|
|
9
|
-
// Track all the start + end events. We key them by the PID+TID so we don't
|
|
10
|
-
// accidentally pair across different threads.
|
|
11
|
-
let animationFrameStarts = new Map();
|
|
12
|
-
let animationFrameEnds = new Map();
|
|
13
|
-
// Store all the AnimationFrame::Presentation events. Key them by their ID for
|
|
14
|
-
// easy look-up later on when we associate one to the AnimationFrame event.
|
|
15
|
-
let animationFramePresentations = new Map();
|
|
16
|
-
// The final list of animation frames that we return.
|
|
17
|
-
let animationFrames = [];
|
|
18
|
-
let presentationForFrame = new Map();
|
|
19
|
-
export function reset() {
|
|
20
|
-
animationFrameStarts = new Map();
|
|
21
|
-
animationFrameEnds = new Map();
|
|
22
|
-
animationFrames = [];
|
|
23
|
-
presentationForFrame = new Map();
|
|
24
|
-
animationFramePresentations = new Map();
|
|
25
|
-
isEnabled = false;
|
|
26
|
-
}
|
|
27
|
-
let isEnabled = false;
|
|
28
|
-
export function handleUserConfig(config) {
|
|
29
|
-
isEnabled = config.enableAnimationsFrameHandler;
|
|
30
|
-
}
|
|
31
|
-
export function handleEvent(event) {
|
|
32
|
-
if (!isEnabled) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (Types.Events.isAnimationFrameAsyncStart(event)) {
|
|
36
|
-
const key = threadKey(event);
|
|
37
|
-
const existing = animationFrameStarts.get(key) ?? [];
|
|
38
|
-
existing.push(event);
|
|
39
|
-
animationFrameStarts.set(key, existing);
|
|
40
|
-
}
|
|
41
|
-
else if (Types.Events.isAnimationFrameAsyncEnd(event)) {
|
|
42
|
-
const key = threadKey(event);
|
|
43
|
-
const existing = animationFrameEnds.get(key) ?? [];
|
|
44
|
-
existing.push(event);
|
|
45
|
-
animationFrameEnds.set(key, existing);
|
|
46
|
-
}
|
|
47
|
-
else if (Types.Events.isAnimationFramePresentation(event) && event.args?.id) {
|
|
48
|
-
animationFramePresentations.set(event.args.id, event);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export async function finalize() {
|
|
52
|
-
// AnimationFrames are represented with begin & end events on a stack; so we
|
|
53
|
-
// can pair them by walking through the list of start events and pairing with
|
|
54
|
-
// the same index in the list of end events, once both lists are sorted by
|
|
55
|
-
// timestamp.
|
|
56
|
-
// We walk through the set of begin/end events we gathered per pid+tid and
|
|
57
|
-
// pair those up.
|
|
58
|
-
// Unfortunately we cannot use the pairing helpers in Helpers.Trace because
|
|
59
|
-
// only the begin event has an ID; the end event does not. But because we
|
|
60
|
-
// know that AnimationFrames are sequential and do not overlap, we can pair
|
|
61
|
-
// up events easily.
|
|
62
|
-
for (const [key, startEvents] of animationFrameStarts.entries()) {
|
|
63
|
-
const endEvents = animationFrameEnds.get(key);
|
|
64
|
-
if (!endEvents) {
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
Helpers.Trace.sortTraceEventsInPlace(startEvents);
|
|
68
|
-
Helpers.Trace.sortTraceEventsInPlace(endEvents);
|
|
69
|
-
for (let i = 0; i < startEvents.length; i++) {
|
|
70
|
-
const endEvent = endEvents.at(i);
|
|
71
|
-
if (!endEvent) {
|
|
72
|
-
// Invalid data: break. We can't pair any other events up.
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
const startEvent = startEvents[i];
|
|
76
|
-
const syntheticEvent = Helpers.SyntheticEvents.SyntheticEventsManager
|
|
77
|
-
.registerSyntheticEvent({
|
|
78
|
-
rawSourceEvent: startEvent,
|
|
79
|
-
...startEvent,
|
|
80
|
-
dur: Types.Timing.Micro(endEvent.ts - startEvent.ts),
|
|
81
|
-
args: {
|
|
82
|
-
data: {
|
|
83
|
-
beginEvent: startEvent,
|
|
84
|
-
endEvent,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
animationFrames.push(syntheticEvent);
|
|
89
|
-
// AnimationFrame begin events + AnimationFrame::Presentation events share
|
|
90
|
-
// an args.id, so we can pair them up based on that.
|
|
91
|
-
const id = startEvent.args?.id;
|
|
92
|
-
if (id) {
|
|
93
|
-
const presentationEvent = animationFramePresentations.get(id);
|
|
94
|
-
if (presentationEvent) {
|
|
95
|
-
presentationForFrame.set(syntheticEvent, presentationEvent);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
export function data() {
|
|
102
|
-
return {
|
|
103
|
-
animationFrames,
|
|
104
|
-
presentationForFrame,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
export function deps() {
|
|
108
|
-
return ['Meta'];
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=AnimationFramesHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationFramesHandler.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/handlers/AnimationFramesHandler.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,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AAE,CAAC,EAAE,EAAE,CAAC;YAC5C,MAAM,QAAQ,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,0DAA0D;gBAC1D,MAAM;YACR,CAAC;YACD,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YAElC,MAAM,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,sBAAsB;iBACzC,sBAAsB,CAA2C;gBAChE,cAAc,EAAE,UAAU;gBAC1B,GAAG,UAAU;gBACb,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;gBACpD,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,UAAU,EAAE,UAAU;wBACtB,QAAQ;qBACT;iBACF;aACF,CAAC,CAAC;YAC9B,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAErC,0EAA0E;YAC1E,oDAAoD;YACpD,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;YAC/B,IAAI,EAAE,EAAE,CAAC;gBACP,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC9D,IAAI,iBAAiB,EAAE,CAAC;oBACtB,oBAAoB,CAAC,GAAG,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO;QACL,eAAe;QACf,oBAAoB;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC","sourcesContent":["// Copyright 2024 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.\nimport * as Helpers from '../helpers/helpers.js';\nimport * as Types from '../types/types.js';\n\nimport type {HandlerName} from './types.js';\n\nexport interface Data {\n animationFrames: Types.Events.SyntheticAnimationFramePair[];\n presentationForFrame: Map<Types.Events.SyntheticAnimationFramePair, Types.Events.AnimationFramePresentation>;\n}\n\nfunction threadKey(data: Types.Events.Event): string {\n return `${data.pid}-${data.tid}`;\n}\n// Track all the start + end events. We key them by the PID+TID so we don't\n// accidentally pair across different threads.\nlet animationFrameStarts = new Map<string, Types.Events.AnimationFrameAsyncStart[]>();\nlet animationFrameEnds = new Map<string, Types.Events.AnimationFrameAsyncEnd[]>();\n// Store all the AnimationFrame::Presentation events. Key them by their ID for\n// easy look-up later on when we associate one to the AnimationFrame event.\nlet animationFramePresentations = new Map<string, Types.Events.AnimationFramePresentation>();\n\n// The final list of animation frames that we return.\nlet animationFrames: Types.Events.SyntheticAnimationFramePair[] = [];\n\nlet presentationForFrame = new Map<Types.Events.SyntheticAnimationFramePair, Types.Events.AnimationFramePresentation>();\n\nexport function reset(): void {\n animationFrameStarts = new Map();\n animationFrameEnds = new Map();\n animationFrames = [];\n presentationForFrame = new Map();\n animationFramePresentations = new Map();\n isEnabled = false;\n}\n\nlet isEnabled = false;\nexport function handleUserConfig(config: Types.Configuration.Configuration): void {\n isEnabled = config.enableAnimationsFrameHandler;\n}\n\nexport function handleEvent(event: Types.Events.Event): void {\n if (!isEnabled) {\n return;\n }\n\n if (Types.Events.isAnimationFrameAsyncStart(event)) {\n const key = threadKey(event);\n const existing = animationFrameStarts.get(key) ?? [];\n existing.push(event);\n animationFrameStarts.set(key, existing);\n } else if (Types.Events.isAnimationFrameAsyncEnd(event)) {\n const key = threadKey(event);\n const existing = animationFrameEnds.get(key) ?? [];\n existing.push(event);\n animationFrameEnds.set(key, existing);\n } else if (Types.Events.isAnimationFramePresentation(event) && event.args?.id) {\n animationFramePresentations.set(event.args.id, event);\n }\n}\n\nexport async function finalize(): Promise<void> {\n // AnimationFrames are represented with begin & end events on a stack; so we\n // can pair them by walking through the list of start events and pairing with\n // the same index in the list of end events, once both lists are sorted by\n // timestamp.\n // We walk through the set of begin/end events we gathered per pid+tid and\n // pair those up.\n // Unfortunately we cannot use the pairing helpers in Helpers.Trace because\n // only the begin event has an ID; the end event does not. But because we\n // know that AnimationFrames are sequential and do not overlap, we can pair\n // up events easily.\n for (const [key, startEvents] of animationFrameStarts.entries()) {\n const endEvents = animationFrameEnds.get(key);\n if (!endEvents) {\n continue;\n }\n\n Helpers.Trace.sortTraceEventsInPlace(startEvents);\n Helpers.Trace.sortTraceEventsInPlace(endEvents);\n\n for (let i = 0; i < startEvents.length; i++) {\n const endEvent = endEvents.at(i);\n if (!endEvent) {\n // Invalid data: break. We can't pair any other events up.\n break;\n }\n const startEvent = startEvents[i];\n\n const syntheticEvent = Helpers.SyntheticEvents.SyntheticEventsManager\n .registerSyntheticEvent<Types.Events.SyntheticAnimationFramePair>({\n rawSourceEvent: startEvent,\n ...startEvent,\n dur: Types.Timing.Micro(endEvent.ts - startEvent.ts),\n args: {\n data: {\n beginEvent: startEvent,\n endEvent,\n },\n },\n });\n animationFrames.push(syntheticEvent);\n\n // AnimationFrame begin events + AnimationFrame::Presentation events share\n // an args.id, so we can pair them up based on that.\n const id = startEvent.args?.id;\n if (id) {\n const presentationEvent = animationFramePresentations.get(id);\n if (presentationEvent) {\n presentationForFrame.set(syntheticEvent, presentationEvent);\n }\n }\n }\n }\n}\n\nexport function data(): Data {\n return {\n animationFrames,\n presentationForFrame,\n };\n}\n\nexport function deps(): HandlerName[] {\n return ['Meta'];\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright 2022 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
import * as Helpers from '../helpers/helpers.js';
|
|
5
|
-
import * as Types from '../types/types.js';
|
|
6
|
-
let animations = [];
|
|
7
|
-
let animationsSyntheticEvents = [];
|
|
8
|
-
export function reset() {
|
|
9
|
-
animations = [];
|
|
10
|
-
animationsSyntheticEvents = [];
|
|
11
|
-
}
|
|
12
|
-
export function handleEvent(event) {
|
|
13
|
-
if (Types.Events.isAnimation(event)) {
|
|
14
|
-
animations.push(event);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export async function finalize() {
|
|
19
|
-
const syntheticEvents = Helpers.Trace.createMatchedSortedSyntheticEvents(animations);
|
|
20
|
-
animationsSyntheticEvents.push(...syntheticEvents);
|
|
21
|
-
}
|
|
22
|
-
export function data() {
|
|
23
|
-
return {
|
|
24
|
-
animations: animationsSyntheticEvents,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=AnimationHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationHandler.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/handlers/AnimationHandler.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,IAAI,UAAU,GAA6B,EAAE,CAAC;AAC9C,IAAI,yBAAyB,GAA0C,EAAE,CAAC;AAM1E,MAAM,UAAU,KAAK;IACnB,UAAU,GAAG,EAAE,CAAC;IAChB,yBAAyB,GAAG,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO;IACT,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC;IACrF,yBAAyB,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO;QACL,UAAU,EAAE,yBAAyB;KACtC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright 2022 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 * as Helpers from '../helpers/helpers.js';\nimport * as Types from '../types/types.js';\n\nlet animations: Types.Events.Animation[] = [];\nlet animationsSyntheticEvents: Types.Events.SyntheticAnimationPair[] = [];\n\nexport interface AnimationData {\n animations: readonly Types.Events.SyntheticAnimationPair[];\n}\n\nexport function reset(): void {\n animations = [];\n animationsSyntheticEvents = [];\n}\n\nexport function handleEvent(event: Types.Events.Event): void {\n if (Types.Events.isAnimation(event)) {\n animations.push(event);\n return;\n }\n}\n\nexport async function finalize(): Promise<void> {\n const syntheticEvents = Helpers.Trace.createMatchedSortedSyntheticEvents(animations);\n animationsSyntheticEvents.push(...syntheticEvents);\n}\n\nexport function data(): AnimationData {\n return {\n animations: animationsSyntheticEvents,\n };\n}\n"]}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
import * as Platform from '../../../core/platform/platform.js';
|
|
5
|
-
import * as Types from '../types/types.js';
|
|
6
|
-
import { data as flowsHandlerData } from './FlowsHandler.js';
|
|
7
|
-
import { data as rendererHandlerData } from './RendererHandler.js';
|
|
8
|
-
let schedulerToRunEntryPoints = new Map();
|
|
9
|
-
let taskScheduleForTaskRunEvent = new Map();
|
|
10
|
-
let asyncCallToScheduler = new Map();
|
|
11
|
-
let runEntryPointToScheduler = new Map();
|
|
12
|
-
export function reset() {
|
|
13
|
-
schedulerToRunEntryPoints = new Map();
|
|
14
|
-
asyncCallToScheduler = new Map();
|
|
15
|
-
taskScheduleForTaskRunEvent = new Map();
|
|
16
|
-
runEntryPointToScheduler = new Map();
|
|
17
|
-
}
|
|
18
|
-
export function handleEvent(_) {
|
|
19
|
-
}
|
|
20
|
-
export async function finalize() {
|
|
21
|
-
const { flows } = flowsHandlerData();
|
|
22
|
-
const { entryToNode } = rendererHandlerData();
|
|
23
|
-
// Process async task flows
|
|
24
|
-
for (const flow of flows) {
|
|
25
|
-
let maybeAsyncTaskScheduled = flow.at(0);
|
|
26
|
-
if (!maybeAsyncTaskScheduled) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
if (Types.Events.isDebuggerAsyncTaskRun(maybeAsyncTaskScheduled)) {
|
|
30
|
-
// Sometimes a AsyncTaskRun event run can incorrectly appear as
|
|
31
|
-
// initiated by another AsyncTaskRun from Perfetto's flows
|
|
32
|
-
// perspective.
|
|
33
|
-
// For example, in this snippet:
|
|
34
|
-
//
|
|
35
|
-
// const myTask = console.createTask('hola'); // creates an AsyncTaskSchedule
|
|
36
|
-
// myTask.run(something); // creates an AsyncTaskRun
|
|
37
|
-
// myTask.run(somethingElse); // creates an AsyncTaskRun
|
|
38
|
-
//
|
|
39
|
-
// or also in this one
|
|
40
|
-
//
|
|
41
|
-
// setInterval(something); // creates multiple connected AsyncTaskRun.
|
|
42
|
-
//
|
|
43
|
-
// Because the flow id is created based on the task's memory address,
|
|
44
|
-
// the three events will end up belonging to the same flow (even if
|
|
45
|
-
// in the frontend we receive it as pairs), and elements in a flow
|
|
46
|
-
// are connected to their immediately consecutive neighbor.
|
|
47
|
-
//
|
|
48
|
-
// To ensure we use the right Schedule event, if the "initiating"
|
|
49
|
-
// portion of the flow is a Run event, we look for any corresponding
|
|
50
|
-
// Schedule event that we might have found before.
|
|
51
|
-
maybeAsyncTaskScheduled = taskScheduleForTaskRunEvent.get(maybeAsyncTaskScheduled);
|
|
52
|
-
}
|
|
53
|
-
if (!maybeAsyncTaskScheduled || !Types.Events.isDebuggerAsyncTaskScheduled(maybeAsyncTaskScheduled)) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
const taskName = maybeAsyncTaskScheduled.args.taskName;
|
|
57
|
-
const asyncTaskRun = flow.at(1);
|
|
58
|
-
if (!asyncTaskRun || !Types.Events.isDebuggerAsyncTaskRun(asyncTaskRun)) {
|
|
59
|
-
// Unexpected flow shape, ignore.
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
// Cache the Schedule event for this Run for future reference.
|
|
63
|
-
taskScheduleForTaskRunEvent.set(asyncTaskRun, maybeAsyncTaskScheduled);
|
|
64
|
-
// Get the JS call scheduled the task.
|
|
65
|
-
const asyncCaller = findNearestJSAncestor(maybeAsyncTaskScheduled, entryToNode);
|
|
66
|
-
// Get the trace entrypoint for the scheduled task (e.g. FunctionCall, etc.).
|
|
67
|
-
const asyncEntryPoint = findFirstJsInvocationForAsyncTaskRun(asyncTaskRun, entryToNode);
|
|
68
|
-
// Store the async relationship between traces to be shown with initiator arrows.
|
|
69
|
-
// Default to the AsyncTask events in case the JS entrypoints aren't found.
|
|
70
|
-
runEntryPointToScheduler.set(asyncEntryPoint || asyncTaskRun, { taskName, scheduler: asyncCaller || maybeAsyncTaskScheduled });
|
|
71
|
-
if (!asyncCaller || !asyncEntryPoint) {
|
|
72
|
-
// Unexpected async call trace data shape, ignore.
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
// Set scheduler -> scheduled mapping.
|
|
76
|
-
// The scheduled being the JS entrypoint
|
|
77
|
-
const entryPoints = Platform.MapUtilities.getWithDefault(schedulerToRunEntryPoints, asyncCaller, () => []);
|
|
78
|
-
entryPoints.push(asyncEntryPoint);
|
|
79
|
-
// Set scheduled -> scheduler mapping.
|
|
80
|
-
// The scheduled being the JS calls (instead of the entrypoints as
|
|
81
|
-
// above, for usage ergonomics).
|
|
82
|
-
const scheduledProfileCalls = findFirstJSCallsForAsyncTaskRun(asyncTaskRun, entryToNode);
|
|
83
|
-
for (const call of scheduledProfileCalls) {
|
|
84
|
-
asyncCallToScheduler.set(call, { taskName, scheduler: asyncCaller });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Given a DebuggerAsyncTaskScheduled event, returns its closest
|
|
90
|
-
* ProfileCall or JS invocation ancestor, which represents the JS call
|
|
91
|
-
* that scheduled the async task.
|
|
92
|
-
*/
|
|
93
|
-
function findNearestJSAncestor(asyncTaskScheduled, entryToNode) {
|
|
94
|
-
let node = entryToNode.get(asyncTaskScheduled)?.parent;
|
|
95
|
-
while (node) {
|
|
96
|
-
if (Types.Events.isProfileCall(node.entry) || acceptJSInvocationsPredicate(node.entry)) {
|
|
97
|
-
return node.entry;
|
|
98
|
-
}
|
|
99
|
-
node = node.parent;
|
|
100
|
-
}
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Entrypoints to JS execution in the timeline. We ignore those starting
|
|
105
|
-
* with 'v8' because they aren't shown in the timeline, and ultimately
|
|
106
|
-
* this function's output results in "initiated" events, so ideally this
|
|
107
|
-
* returns events that end up in the flame chart.
|
|
108
|
-
*/
|
|
109
|
-
function acceptJSInvocationsPredicate(event) {
|
|
110
|
-
const eventIsConsoleRunTask = Types.Events.isConsoleRunTask(event);
|
|
111
|
-
const eventIsV8EntryPoint = event.name.startsWith('v8') || event.name.startsWith('V8');
|
|
112
|
-
return Types.Events.isJSInvocationEvent(event) && (eventIsConsoleRunTask || !eventIsV8EntryPoint);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Given a DebuggerAsyncTaskRun event, returns its closest JS entry
|
|
116
|
-
* point descendant, which contains the task being scheduled.
|
|
117
|
-
*/
|
|
118
|
-
function findFirstJsInvocationForAsyncTaskRun(asyncTaskRun, entryToNode) {
|
|
119
|
-
// Ignore descendants of other DebuggerAsyncTaskRuns since they
|
|
120
|
-
// are part of another async task and have to be handled separately
|
|
121
|
-
return findFirstDescendantsOfType(asyncTaskRun, entryToNode, acceptJSInvocationsPredicate, Types.Events.isDebuggerAsyncTaskRun)
|
|
122
|
-
.at(0);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Given an async task run event, returns the top level call frames
|
|
126
|
-
* (profile calls) directly called by the async task. This implies that
|
|
127
|
-
* any profile calls under another async task run event are ignored.
|
|
128
|
-
* These profile calls represent the JS task being scheduled, AKA
|
|
129
|
-
* the other part of the async stack.
|
|
130
|
-
*
|
|
131
|
-
* For example, here the profile calls "js 1", "js 2" and "js 4" would
|
|
132
|
-
* be returned:
|
|
133
|
-
*
|
|
134
|
-
* |------------------Async Task Run------------------|
|
|
135
|
-
* |--FunctionCall--| |--FunctionCall--|
|
|
136
|
-
* |-js 1-||-js 2-| |-js 4-|
|
|
137
|
-
* |-js 3-|
|
|
138
|
-
*
|
|
139
|
-
* But here, only "js 1" and "js 2" would be returned:
|
|
140
|
-
*
|
|
141
|
-
* |------------------Async Task Run------------------|
|
|
142
|
-
* |--FunctionCall--| |------------------------|
|
|
143
|
-
* |-js 1-||-js 2-| |---Async Task Run--|
|
|
144
|
-
* |-js 3-| |--FunctionCall--|
|
|
145
|
-
* |-js 4-|
|
|
146
|
-
*/
|
|
147
|
-
function findFirstJSCallsForAsyncTaskRun(asyncTaskRun, entryToNode) {
|
|
148
|
-
// Ignore descendants of other DebuggerAsyncTaskRuns since they
|
|
149
|
-
// are part of another async task and have to be handled separately
|
|
150
|
-
return findFirstDescendantsOfType(asyncTaskRun, entryToNode, Types.Events.isProfileCall, Types.Events.isDebuggerAsyncTaskRun);
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Given a root event returns all the first descendants that meet a
|
|
154
|
-
* predicate condition (predicateAccept) while ignoring subtrees whose
|
|
155
|
-
* top event meets an ignore condition (predicateIgnore).
|
|
156
|
-
*/
|
|
157
|
-
function findFirstDescendantsOfType(root, entryToNode, predicateAccept, predicateIgnore) {
|
|
158
|
-
const node = entryToNode.get(root);
|
|
159
|
-
if (!node) {
|
|
160
|
-
return [];
|
|
161
|
-
}
|
|
162
|
-
const childrenGroups = [[...node.children]];
|
|
163
|
-
const firstDescendants = [];
|
|
164
|
-
for (let i = 0; i < childrenGroups.length; i++) {
|
|
165
|
-
const siblings = childrenGroups[i];
|
|
166
|
-
for (let j = 0; j < siblings.length; j++) {
|
|
167
|
-
const node = siblings[j];
|
|
168
|
-
if (predicateAccept(node.entry)) {
|
|
169
|
-
firstDescendants.push(node.entry);
|
|
170
|
-
}
|
|
171
|
-
else if (!predicateIgnore(node.entry)) {
|
|
172
|
-
childrenGroups.push([...node.children]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return firstDescendants;
|
|
177
|
-
}
|
|
178
|
-
export function data() {
|
|
179
|
-
return {
|
|
180
|
-
schedulerToRunEntryPoints,
|
|
181
|
-
asyncCallToScheduler,
|
|
182
|
-
runEntryPointToScheduler,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
export function deps() {
|
|
186
|
-
return ['Renderer', 'Flows'];
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=AsyncJSCallsHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncJSCallsHandler.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/handlers/AsyncJSCallsHandler.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,KAAK,QAAQ,MAAM,oCAAoC,CAAC;AAE/D,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAC,IAAI,IAAI,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,IAAI,IAAI,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAEjE,IAAI,yBAAyB,GACzB,IAAI,GAAG,EAA4C,CAAC;AAExD,IAAI,2BAA2B,GAC3B,IAAI,GAAG,EAA8E,CAAC;AAC1F,IAAI,oBAAoB,GACpB,IAAI,GAAG,EAAwF,CAAC;AAEpG,IAAI,wBAAw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AAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright 2024 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.\nimport * as Platform from '../../../core/platform/platform.js';\nimport type * as Helpers from '../helpers/helpers.js';\nimport * as Types from '../types/types.js';\n\nimport {data as flowsHandlerData} from './FlowsHandler.js';\nimport {data as rendererHandlerData} from './RendererHandler.js';\n\nlet schedulerToRunEntryPoints: Map<Types.Events.Event, Types.Events.Event[]> =\n new Map<Types.Events.Event, Types.Events.Event[]>();\n\nlet taskScheduleForTaskRunEvent: Map<Types.Events.DebuggerAsyncTaskRun, Types.Events.DebuggerAsyncTaskScheduled> =\n new Map<Types.Events.DebuggerAsyncTaskRun, Types.Events.DebuggerAsyncTaskScheduled>();\nlet asyncCallToScheduler: Map<Types.Events.SyntheticProfileCall, {taskName: string, scheduler: Types.Events.Event}> =\n new Map<Types.Events.SyntheticProfileCall, {taskName: string, scheduler: Types.Events.Event}>();\n\nlet runEntryPointToScheduler: Map<Types.Events.Event, {taskName: string, scheduler: Types.Events.Event}> =\n new Map<Types.Events.Event, {taskName: string, scheduler: Types.Events.Event}>();\n\nexport function reset(): void {\n schedulerToRunEntryPoints = new Map();\n asyncCallToScheduler = new Map();\n taskScheduleForTaskRunEvent = new Map();\n runEntryPointToScheduler = new Map();\n}\n\nexport function handleEvent(_: Types.Events.Event): void {\n}\n\nexport async function finalize(): Promise<void> {\n const {flows} = flowsHandlerData();\n const {entryToNode} = rendererHandlerData();\n // Process async task flows\n for (const flow of flows) {\n let maybeAsyncTaskScheduled = flow.at(0);\n if (!maybeAsyncTaskScheduled) {\n continue;\n }\n if (Types.Events.isDebuggerAsyncTaskRun(maybeAsyncTaskScheduled)) {\n // Sometimes a AsyncTaskRun event run can incorrectly appear as\n // initiated by another AsyncTaskRun from Perfetto's flows\n // perspective.\n // For example, in this snippet:\n //\n // const myTask = console.createTask('hola'); // creates an AsyncTaskSchedule\n // myTask.run(something); // creates an AsyncTaskRun\n // myTask.run(somethingElse); // creates an AsyncTaskRun\n //\n // or also in this one\n //\n // setInterval(something); // creates multiple connected AsyncTaskRun.\n //\n // Because the flow id is created based on the task's memory address,\n // the three events will end up belonging to the same flow (even if\n // in the frontend we receive it as pairs), and elements in a flow\n // are connected to their immediately consecutive neighbor.\n //\n // To ensure we use the right Schedule event, if the \"initiating\"\n // portion of the flow is a Run event, we look for any corresponding\n // Schedule event that we might have found before.\n maybeAsyncTaskScheduled = taskScheduleForTaskRunEvent.get(maybeAsyncTaskScheduled);\n }\n if (!maybeAsyncTaskScheduled || !Types.Events.isDebuggerAsyncTaskScheduled(maybeAsyncTaskScheduled)) {\n continue;\n }\n const taskName = maybeAsyncTaskScheduled.args.taskName;\n const asyncTaskRun = flow.at(1);\n if (!asyncTaskRun || !Types.Events.isDebuggerAsyncTaskRun(asyncTaskRun)) {\n // Unexpected flow shape, ignore.\n continue;\n }\n // Cache the Schedule event for this Run for future reference.\n taskScheduleForTaskRunEvent.set(asyncTaskRun, maybeAsyncTaskScheduled);\n\n // Get the JS call scheduled the task.\n const asyncCaller = findNearestJSAncestor(maybeAsyncTaskScheduled, entryToNode);\n\n // Get the trace entrypoint for the scheduled task (e.g. FunctionCall, etc.).\n const asyncEntryPoint = findFirstJsInvocationForAsyncTaskRun(asyncTaskRun, entryToNode);\n\n // Store the async relationship between traces to be shown with initiator arrows.\n // Default to the AsyncTask events in case the JS entrypoints aren't found.\n runEntryPointToScheduler.set(\n asyncEntryPoint || asyncTaskRun, {taskName, scheduler: asyncCaller || maybeAsyncTaskScheduled});\n if (!asyncCaller || !asyncEntryPoint) {\n // Unexpected async call trace data shape, ignore.\n continue;\n }\n // Set scheduler -> scheduled mapping.\n // The scheduled being the JS entrypoint\n const entryPoints = Platform.MapUtilities.getWithDefault(schedulerToRunEntryPoints, asyncCaller, () => []);\n entryPoints.push(asyncEntryPoint);\n\n // Set scheduled -> scheduler mapping.\n // The scheduled being the JS calls (instead of the entrypoints as\n // above, for usage ergonomics).\n const scheduledProfileCalls = findFirstJSCallsForAsyncTaskRun(asyncTaskRun, entryToNode);\n for (const call of scheduledProfileCalls) {\n asyncCallToScheduler.set(call, {taskName, scheduler: asyncCaller});\n }\n }\n}\n/**\n * Given a DebuggerAsyncTaskScheduled event, returns its closest\n * ProfileCall or JS invocation ancestor, which represents the JS call\n * that scheduled the async task.\n */\nfunction findNearestJSAncestor(\n asyncTaskScheduled: Types.Events.DebuggerAsyncTaskScheduled,\n entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>): Types.Events.Event|null {\n let node = entryToNode.get(asyncTaskScheduled)?.parent;\n while (node) {\n if (Types.Events.isProfileCall(node.entry) || acceptJSInvocationsPredicate(node.entry)) {\n return node.entry;\n }\n node = node.parent;\n }\n return null;\n}\n/**\n * Entrypoints to JS execution in the timeline. We ignore those starting\n * with 'v8' because they aren't shown in the timeline, and ultimately\n * this function's output results in \"initiated\" events, so ideally this\n * returns events that end up in the flame chart.\n */\nfunction acceptJSInvocationsPredicate(event: Types.Events.Event): event is Types.Events.Event {\n const eventIsConsoleRunTask = Types.Events.isConsoleRunTask(event);\n const eventIsV8EntryPoint = event.name.startsWith('v8') || event.name.startsWith('V8');\n return Types.Events.isJSInvocationEvent(event) && (eventIsConsoleRunTask || !eventIsV8EntryPoint);\n}\n\n/**\n * Given a DebuggerAsyncTaskRun event, returns its closest JS entry\n * point descendant, which contains the task being scheduled.\n */\nfunction findFirstJsInvocationForAsyncTaskRun(\n asyncTaskRun: Types.Events.DebuggerAsyncTaskRun,\n entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>): Types.Events.Event|undefined {\n // Ignore descendants of other DebuggerAsyncTaskRuns since they\n // are part of another async task and have to be handled separately\n return findFirstDescendantsOfType(\n asyncTaskRun, entryToNode, acceptJSInvocationsPredicate, Types.Events.isDebuggerAsyncTaskRun)\n .at(0);\n}\n\n/**\n * Given an async task run event, returns the top level call frames\n * (profile calls) directly called by the async task. This implies that\n * any profile calls under another async task run event are ignored.\n * These profile calls represent the JS task being scheduled, AKA\n * the other part of the async stack.\n *\n * For example, here the profile calls \"js 1\", \"js 2\" and \"js 4\" would\n * be returned:\n *\n * |------------------Async Task Run------------------|\n * |--FunctionCall--| |--FunctionCall--|\n * |-js 1-||-js 2-| |-js 4-|\n * |-js 3-|\n *\n * But here, only \"js 1\" and \"js 2\" would be returned:\n *\n * |------------------Async Task Run------------------|\n * |--FunctionCall--| |------------------------|\n * |-js 1-||-js 2-| |---Async Task Run--|\n * |-js 3-| |--FunctionCall--|\n * |-js 4-|\n */\nfunction findFirstJSCallsForAsyncTaskRun(\n asyncTaskRun: Types.Events.DebuggerAsyncTaskRun,\n entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>): Types.Events.SyntheticProfileCall[] {\n // Ignore descendants of other DebuggerAsyncTaskRuns since they\n // are part of another async task and have to be handled separately\n return findFirstDescendantsOfType(\n asyncTaskRun, entryToNode, Types.Events.isProfileCall, Types.Events.isDebuggerAsyncTaskRun);\n}\n\n/**\n * Given a root event returns all the first descendants that meet a\n * predicate condition (predicateAccept) while ignoring subtrees whose\n * top event meets an ignore condition (predicateIgnore).\n */\nfunction findFirstDescendantsOfType<T extends Types.Events.Event>(\n root: Types.Events.Event, entryToNode: Map<Types.Events.Event, Helpers.TreeHelpers.TraceEntryNode>,\n predicateAccept: (event: Types.Events.Event) => event is T,\n predicateIgnore: (event: Types.Events.Event) => boolean): T[] {\n const node = entryToNode.get(root);\n if (!node) {\n return [];\n }\n const childrenGroups = [[...node.children]];\n const firstDescendants = [];\n for (let i = 0; i < childrenGroups.length; i++) {\n const siblings = childrenGroups[i];\n for (let j = 0; j < siblings.length; j++) {\n const node = siblings[j];\n if (predicateAccept(node.entry)) {\n firstDescendants.push(node.entry);\n } else if (!predicateIgnore(node.entry)) {\n childrenGroups.push([...node.children]);\n }\n }\n }\n return firstDescendants;\n}\n\nexport function data(): {\n // Given a profile call, returns the JS entrypoint it scheduled (if any).\n // For example, given a setTimeout call, returns the JS entry point\n // trace event for the timeout callback run event (usually a\n // FunctionCall event).\n schedulerToRunEntryPoints: typeof schedulerToRunEntryPoints,\n // Given a profile call, returns the profile call that scheduled it.\n // For example given a timeout callback run event, returns its\n // setTimeout call event.\n asyncCallToScheduler: typeof asyncCallToScheduler,\n // Given a trace event, returns its corresponding async parent trace\n // event caused by an async js call. This can be used as a fallback\n // for cases where a corresponding JS call is not found at either\n // end of the async task scheduling pair (e.g. due to sampling data\n // incompleteness).\n // In the StackTraceForEvent helper, as we move up the call tree,\n // this is used to jump to an async parent stack from a\n // non-profile call trace event in cases where a profile call wasn't\n // found before. In theory we should make the jump from the scheduled\n // profile call using `asyncCallToScheduler`, but its possible that\n // the the call information isn't available to us as a consequence of\n // missing samples.\n runEntryPointToScheduler: typeof runEntryPointToScheduler,\n} {\n return {\n schedulerToRunEntryPoints,\n asyncCallToScheduler,\n runEntryPointToScheduler,\n };\n}\n\nexport function deps(): ['Renderer', 'Flows'] {\n return ['Renderer', 'Flows'];\n}\n"]}
|