Back to Amphtml

TICKEVENTS

extensions/amp-viewer-integration/TICKEVENTS.md

latest6.2 KB
Original Source

Tick Events

When implementing a viewer one can use the tick events for performance tracking.

We use very short string names as tick labels, so the table below further describes these labels. Every start label has an assumed e_label for its "end" counterpart label. As an example if we executed perf.tick('label') we assume we have a counterpart perf.tick('e_label').

NameidDescription
Install StylesisSet when the styles are installed.
End Install Stylese_isSet when the styles are done installing.
Window load eventolWindow load event fired.
First viewport readypcFires when non-ad resources above the fold fired their load event measured from the time the user clicks (So takes pre-rendering into account)
Make Body VisiblembvMake Body Visible Executes.
On First VisibleofvThe first time the page has been turned visible.
First paint timefpThe time on the first non-blank paint of the page.
First contentful paint timefcpFirst paint with content. See https://github.com/WICG/paint-timing
First contentful paint (since visible)fcpvFirst paint with content, offset by first visible time
First input delayfidMillisecond delay in handling the first user input on the page. See https://github.com/WICG/event-timing
Cumulative Layout ShiftclsThe current maximum layout shift score with 5s windows and a 1s session gap. See https://web.dev/layout-instability-api
Cumulative Layout Shift Type UnionclstuThe bitwise union of all Element types that caused layout shift (see ELEMENT_TYPE_ENUM)
Cumulative Layout Shift, first exitcls-1The aggregate layout shift score when the user leaves the page (navigation, tab switching, dismissing application) for the first time.
Cumulative Layout Shift, second exitcls-2The aggregate layout shift score when the user leaves the page (navigation, tab switching, dismissing application) for the second time.
Largest Contentful PaintlcpThe time in milliseconds for the largest contentful element to display.
Largest Contentful Paint TypelcptThe LCP target's Element type (see ELEMENT_TYPE_ENUM)
Largest Contentful Paint (since visible)lcpvThe time in ms for largest contentful element to display, offset by first visible time. Based on render time, falls back to load time.
DOM CompletedomCompleteTime immediately before the browser sets the current document readiness of the current document to complete
DOM Content Loaded Event EnddomContentLoadedEventEndTime immediately after the current document's DOMContentLoaded event completes
DOM Content Loaded Event StartdomContentLoadedEventStartTime immediately before the user agent fires the DOMContentLoaded event at the current document
DOM InteractivedomInteractiveTime immediately before the user agent sets the current document readiness of the current document to interactive
Load Event EndloadEventEndTime when the load event of the current document is completed
Load Event StartloadEventStartTime immediately before the load event of the current document is fired
Request StartrequestStartTime immediately before the user agent starts requesting the resource from the server
Response StartresponseStartTime immediately after the user agent's HTTP parser receives the first byte of the response from the server