Skip to content

Creates custom DevTools Performance Panel populated with entries from the Performance Timeline

License

Notifications You must be signed in to change notification settings

andydavies/perf-timeline-to-devtools-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perf-timeline-to-devtools-profile

Chrome Extension that creates a custom track in the DevTools Performance Panel populated with entries from the Performance Timeline

Originally created to help visualise the LoAF entries in the context of a Chrome Trace

Registers Performance Observers for the following Events and adds performance.marks / measures anotated with data for DevTools

  • LoAF
  • LoAF Scripts
  • Long Tasks
  • LCP
  • INP

Experimental Soft Navigation Support

Enable these two flags in Chrome Canary:

  • chrome://flags/#enable-experimental-web-platform-features
  • chrome://flags/#soft-navigation-heuristics

And then entries for Soft Navigations and Iteraction Contentful Paint should also be added when profiling SPA interactions

Usage

Clone the repo, load as an unpacked extension in Chrome and then profile a page using the performance panel

Example Output

Chrome Performance Panel with Custom Track showing Long Tasks, LoAF and LoAF script entries

Notes

There are some good reasons why a script that contributes to a LoAF might not have attribution details but if you notice a main thread task that you think is missing a script attribution it's worth raising it with the Chrome team.

There are a few issues around this that have already been raised and / or fixed:

Available DevTools colours and payload types are:

type DevToolsColor =
  "primary" | "primary-light" | "primary-dark" |
  "secondary" | "secondary-light" | "secondary-dark" |
  "tertiary" | "tertiary-light" | "tertiary-dark" |
  "error";

interface ExtensionTrackEntryPayload {
  dataType?: "track-entry"; // Defaults to "track-entry"
  color?: DevToolsColor;    // Defaults to "primary"
  track: string;            // Required: Name of the custom track
  trackGroup?: string;      // Optional: Group for organizing tracks
  properties?: [string, string][]; // Key-value pairs for detailed view
  tooltipText?: string;     // Short description for tooltip
}

interface ExtensionMarkerPayload {
  dataType: "marker";       // Required: Identifies as a marker
  color?: DevToolsColor;    // Defaults to "primary"
  properties?: [string, string][]; // Key-value pairs for detailed view
  tooltipText?: string;     // Short description for tooltip
}

About

Creates custom DevTools Performance Panel populated with entries from the Performance Timeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors