Performance/Metrics

From Wikitech
< Performance(Redirected from Webperf)
Jump to navigation Jump to search

This page documents metrics from Performance Team services. Currently in Graphite.

Deployment and monitoring

See Performance/Runbook/Webperf services for the internal details of these services, such as where the metrics originate, and how they are processed/aggregated.

navtiming-2 metrics

The navtiming-2 metrics are available in Graphite under the frontend.navtiming2 prefix.

Offsets

  • responseStart: From PerformanceTiming, relative to fetchStart.
  • firstPaint: (non-standard)
  • domInteractive: From PerformanceTiming, relative to fetchStart.
  • domComplete: From PerformanceTiming, relative to fetchStart.
  • loadEventStart: From PerformanceTiming, relative to fetchStart.
  • loadEventEnd: From PerformanceTiming, relative to fetchStart. Also known as "Page load end" or "Total page load time". This typically corresponds with the browser's native page loading indicator.

Deltas

  • dns: Computed client-side from PerformanceTiming domainLookupEnd - domainLookupStart. (Transmitted as "dnsLookup")
  • unload: Computed client-side from PerformanceTiming unloadEventEnd - unloadEventStart.
  • redirect: Computed client-side from PerformanceTiming redirectEnd - redirectStart. (Transmitted as "redirecting").
  • mediaWikiLoad: Computed client-side based on custom mwLoadEnd and mwLoadStart measures. (Transmitted as "mediaWikiLoadComplete").
  • tcp: Computed server-side as connectEnd - connectStart. This includes SSL negotiation.
  • request: Computed server-side as responseStart - requestStart.
  • response: Computed server-side as responseEnd - responseStart.
  • processing: Computed server-side as domComplete - responseEnd.
  • onLoad: Computed server-side as loadEventEnd - loadEventStart.
  • ssl: Computed server-side as connectEnd - secureConnectionStart. This is a subset of tcp.

Difference with navtiming-1

Notable differences:

  • Offsets are computed relative to fetchStart instead of navigationStart.
  • We no longer filter out zero values.
  • The sanity filter no longer has an upper bound.
  • When the sanity filter encounters negative numbers, it rejects the entire event instead of just the individual data point.

See phab:T104902 for more information about why the metrics were redefined.

SaveTiming metrics

SaveTiming get reported to mw.performance.save in statsd. To see if it's running properly, the mw.performance.save.sample_rate key should have hits.

Synthetic metrics

The synthetic metrics are collected using VisualMetrics analyzing a video recording of the screen when the page is loading.

WebPageTest

The WebPageTest metrics are available in Graphite under the webpagetest prefix.

Visual Metrics

  • render: The time when something for the first time is painted within the viewport.
  • BackgroundImage: The time when the largest background image is painted at its final position within the viewport.
  • Heading: The time when the first h1/h2 heading is painted at its final position within the viewport.
  • LargestImage:The time when the largest image is painted at its final position within the viewport.
  • SpeedIndex:The Speed Index is the average time at which visible parts of the page are displayed. It is expressed in milliseconds and dependent on size of the view port.
  • lastVisualChange:The time when the last paint happens within the viewport.
  • VisualComplete85::The time when 85% of the content within the viewport is painted
  • VisualComplete95:The time when 95% of the content within the viewport is painted.
  • VisualComplete99:The time when 99% of the content within the viewport is painted.

Other timing metrics

  • fullyLoaded:The time all requests on the page has finished loading.
  • TTFB: The time to first byte delivered from the server.
  • domComplete: domComplete from the Navigation Timing APi.

Size and requests

WebPageTest also collects the number of bytes/request per type. Add .bytesor .requeststo the type to get that information.

  • html
  • css
  • js
  • flash
  • font
  • video
  • image
  • total: The total amount of bytes/requests for the tested page.

CPU times

These metrics are Chrome only.

  • Idle:Time spent being idle.
  • Layout:Time spent rendering the screen
  • Painting: Time spent in painting the screen.
  • Scripting:Time spent running JavaScript
  • Loading:Time spent in loading assets.

Visual Metrics

  • render: The time when something for the first time is painted within the viewport.
  • BackgroundImage: The time when the largest background image is painted at its final position within the viewport.
  • Heading: The time when the first h1/h2 heading is painted at its final position within the viewport.
  • LargestImage:The time when the largest image is painted at its final position within the viewport.
  • SpeedIndex:The Speed Index is the average time at which visible parts of the page are displayed. It is expressed in milliseconds and dependent on size of the view port.
  • lastVisualChange:The time when the last paint happens within the viewport.
  • VisualComplete85::The time when 85% of the content within the viewport is painted.
  • VisualComplete95:The time when 95% of the content within the viewport is painted.
  • VisualComplete99:The time when 99% of the content within the viewport is painted.

Other timing metrics

  • fullyLoaded:The time all requests on the page has finished loading.
  • TTFB: The time to first byte delivered from the server.
  • domComplete: domComplete from the Navigation Timing APi.

Size and requests

WebPageTest also collects the number of bytes/request per type. Add .bytes or .requests to the type to get that information.

  • html
  • css
  • js
  • flash
  • font
  • video
  • image
  • total: The total amount of bytes/requests for the tested page.

CPU times

These metrics are Chrome only.

  • Idle:Time spent being idle.
  • Layout:Time spent rendering the screen.
  • Painting: Time spent in painting the screen.
  • Scripting:Time spent running JavaScript.
  • Loading:Time spent in loading assets.

WebPageReplay

The WebPageReplay metrics are available in graphite-synthetic-testing under the sitespeed_io prefix (it's Browsertime/sitespeed.io that collect the metrics).

At the moment we all the default metrics that is collected when you sitespeed.io. Here's a list of some of the most important ones:

Visual Metrics

  • FirstVisualChange:The time when something for the first time is painted within the viewport.
  • Heading: The time when the first h1 heading is painted at its final position within the viewport.
  • LargestImage: The time when the largest image is painted at its final position within the viewport.
  • VisualComplete85:The time when 85% of the content within the viewport is painted.
  • VisualComplete95:The time when 95% of the content within the viewport is painted.
  • VisualComplete99:The time when 99% of the content within the viewport is painted.
  • LastVisualChange:The time when the last paint happens within the viewport.
  • SpeedIndex: The Speed Index is the average time at which visible parts of the page are displayed. It is expressed in milliseconds and dependent on size of the view port.
  • PerceptualSpeedIndex: The Perceptual Speed Index is sensitive to page elements moving around (that is not Speed Index). For example if a campaign/banner pushes the elements, that will have bigger impact on the perceptual metric.

CPU metrics

  • LongTasks.tasks : the number CPU long tasks (> 50 ms)
  • LongTasks.beforeFirstPaint : the number CPU long tasks happening before anything is painted on the screen (> 50 ms)
  • LongTasks.totalDuration : the total time (in ms) spent in CPU long tasks
  • LongTasks.beforeFirstPaint.totalDuration : the total time (in ms) spent in CPU long tasks before anything was painted on the screen.

See also