[navigation-timing-tests][server-timing-tests][user-timing-tests] Server-Timing (#5779)

Parse Server-Timing response headers and make the metric name(s), value(s), and
description(s) available as PerformanceServerTiming entries on the global
performance timeline and to PerformanceObservers. This feature is behind the
"ServerTiming" experimental-features flag.

To test, turn the flag on
(chrome://flags/#enable-experimental-web-platform-features) and explore to
https://server-timing.now.sh/. Execute `performance.getEntriesByType('server')`
in DevTools to inspect the 4 entries for the base page, as per the response
header:
server-timing:db=100; "Database metric", api=200; "HTTP/API metric", cache=300; "cache metric", total=0.000297322; "Total Response Time"

To inspect the 4 entries for the favicon.ico, you will need to set up a
PerformanceObserver (I use TamperMonkey to inject a content script) like this:
new PerformanceObserver(function(list, observer) {
  console.info(list.getEntries())
  observer.disconnect()
}).observe({entryTypes: ['server']})

Spec: https://w3c.github.io/server-timing/
Intent to implement:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/y3qwr490Fc4/boGoo41-BwAJ

BUG=702760

Review-Url: https://codereview.chromium.org/2839683003
Cr-Commit-Position: refs/heads/master@{#469303}



View on GitHub: https://github.com/w3c/web-platform-tests/pull/5779

Received on Thursday, 4 May 2017 10:26:10 UTC