Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2799093004: Enable ServerTiming support

Created:
3 years, 8 months ago by cvazac
Modified:
3 years, 8 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-w3ctests_chromium.org, Yoav Weiss, blink-reviews-frames_chromium.org, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Server-Timing 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

Patch Set 1 #

Total comments: 4

Patch Set 2 : update code formatting and comments #

Total comments: 10

Patch Set 3 : address CL concerns #

Patch Set 4 : server-timing #

Total comments: 8

Patch Set 5 : Updates for Patch Set 4 #

Patch Set 6 : Updates for Patch Set 4 #

Patch Set 7 : Updates for Patch Set 4 #

Total comments: 1

Patch Set 8 : updates for Patch Set 7 #

Patch Set 9 : updates for Patch Set 7 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+895 lines, -78 lines) Patch
A third_party/WebKit/LayoutTests/external/wpt/common/performance-timeline-utils.js View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/resources/webperftestharness.js View 1 2 3 3 chunks +0 lines, -37 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_document_open.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigate_within_document.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigation_attributes_exist.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigation_redirectCount_none.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigation_type_backforward.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigation_type_enums.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_navigation_type_reload.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_no_previous_document.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_performance_attributes_exist.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_performance_attributes_exist_in_object.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_readwrite.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_attributes_exist.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_attributes_order.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_client_redirect.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_reload.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_server_redirect.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_xserver_redirect.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_unique_performance_objects.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/blue.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/blue.png.sub.headers View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/green.png View Binary file 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/green.png.sub.headers View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/server-timing/test_server_timing.html.sub.headers View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/user-timing/measure.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/user-timing/measure_navigation_timing.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js View 1 2 3 4 chunks +0 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/core/core_idl_files.gni View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceBase.h View 1 2 3 4 5 3 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceBase.cpp View 1 2 3 4 5 6 7 8 8 chunks +63 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceEntry.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceEntry.cpp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/timing/PerformanceServerTiming.h View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/timing/PerformanceServerTiming.idl View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPNames.json5 View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.h View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.cpp View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp View 1 2 3 1 chunk +498 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (15 generated)
cvazac
3 years, 8 months ago (2017-04-06 18:04:04 UTC) #2
Yoav Weiss
LGTM! Thanks for working on this :) A few nits related to comment formatting panicker@ ...
3 years, 8 months ago (2017-04-06 20:19:55 UTC) #8
panicker
Great work. Couple comments. https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode325 third_party/WebKit/Source/core/timing/PerformanceBase.cpp:325: notifyObserversOfEntry(*entry); would be good to ...
3 years, 8 months ago (2017-04-06 22:42:22 UTC) #9
panicker
https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js File third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js (right): https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js#newcode9 third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js:9: */ Could you provide some context on this test ...
3 years, 8 months ago (2017-04-06 22:48:19 UTC) #10
cvazac
https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js File third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js (right): https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js#newcode9 third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js:9: */ Yes, I added the 4th copy of `wp_test()` ...
3 years, 8 months ago (2017-04-06 23:50:00 UTC) #11
cvazac
https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): https://codereview.chromium.org/2799093004/diff/20001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode327 third_party/WebKit/Source/core/timing/PerformanceBase.cpp:327: m_serverTimingBuffer.push_back(*entry); Sure! Like resource timing (https://www.w3.org/TR/resource-timing/#extensions-performance-interface), should I add ...
3 years, 8 months ago (2017-04-06 23:58:02 UTC) #12
Charlie Harrison
LGTM when panicker is happy, I just have a few nits. Do you mind wrapping ...
3 years, 8 months ago (2017-04-07 12:43:02 UTC) #13
panicker
I was looking at your spec CL https://github.com/w3c/performance-timeline/pull/76/files Looks like there's a new bool PerformanceObserverInit.buffered ...
3 years, 8 months ago (2017-04-07 23:01:32 UTC) #16
panicker
On 2017/04/07 23:01:32, panicker wrote: > I was looking at your spec CL > https://github.com/w3c/performance-timeline/pull/76/files ...
3 years, 8 months ago (2017-04-07 23:15:10 UTC) #17
cvazac
Yes! I plan on implementing `buffered` for all `entryTypes`. But, because that part of the ...
3 years, 8 months ago (2017-04-13 20:32:01 UTC) #18
panicker
https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js File third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js (right): https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js#newcode12 third_party/WebKit/LayoutTests/external/wpt/server-timing/resources/webperftestharness.js:12: function test_entries(actualEntries, expectedEntries) { why not move this to ...
3 years, 8 months ago (2017-04-14 19:31:04 UTC) #19
cvazac
https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode69 third_party/WebKit/Source/core/timing/PerformanceBase.cpp:69: static const size_t kServerTimingBufferSize = 1000; Was a WAG, ...
3 years, 8 months ago (2017-04-17 17:48:42 UTC) #20
panicker
https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode521 third_party/WebKit/Source/core/timing/PerformanceBase.cpp:521: for (auto& observer : observers_) { On 2017/04/17 17:48:42, ...
3 years, 8 months ago (2017-04-18 17:07:32 UTC) #21
cvazac
On 2017/04/18 17:07:32, panicker wrote: > https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp > File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): > > https://codereview.chromium.org/2799093004/diff/60001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode521 > ...
3 years, 8 months ago (2017-04-18 21:48:41 UTC) #22
panicker
https://codereview.chromium.org/2799093004/diff/120001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): https://codereview.chromium.org/2799093004/diff/120001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode520 third_party/WebKit/Source/core/timing/PerformanceBase.cpp:520: for (auto& observer : observers_) { you can still ...
3 years, 8 months ago (2017-04-18 21:57:45 UTC) #23
panicker
On 2017/04/18 21:57:45, panicker wrote: > https://codereview.chromium.org/2799093004/diff/120001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp > File third_party/WebKit/Source/core/timing/PerformanceBase.cpp (right): > > https://codereview.chromium.org/2799093004/diff/120001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp#newcode520 > ...
3 years, 8 months ago (2017-04-20 18:19:36 UTC) #24
cvazac
On 2017/04/20 18:19:36, panicker wrote: > On 2017/04/18 21:57:45, panicker wrote: > > > https://codereview.chromium.org/2799093004/diff/120001/third_party/WebKit/Source/core/timing/PerformanceBase.cpp ...
3 years, 8 months ago (2017-04-20 18:28:21 UTC) #25
panicker
LGTM Thanks for your work on this!
3 years, 8 months ago (2017-04-20 18:32:28 UTC) #26
cvazac
my pleasure! is there anything i need to do?
3 years, 8 months ago (2017-04-20 23:10:56 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799093004/160001
3 years, 8 months ago (2017-04-24 17:44:03 UTC) #34
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 17:44:05 UTC) #36
The author cvazac@gmail.com has not signed Google Contributor License Agreement.
Please visit https://cla.developers.google.com to sign and manage CLA.

Powered by Google App Engine
This is Rietveld 408576698