It would be super helpful to see when a response was saved to cache storage. We can add this to the data grid.
Here is the inspector agent for cache storage: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.h?q=cachestorage+inspector+agent&dr=CSs&l=29 Here is where we request entries: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=441 Which starts (after openning the cache) by asking for all keys (which are 'request' objects): https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=313 We passed a callback to that request, which onsuccess we fetch all responses: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=268 and https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=282 which we add to an accumulator: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=182 You can do a trivial change by modifying this line: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp?dr=CSs&l=188 To get the ResponseTime instead of the status text: https://cs.chromium.org/chromium/src/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponse.h?dr=CSs&l=78 Preferably we want to update the protocol here between devtools and c++, so instead of a DataEntry with a string request and string response, we can also have number for the responsetime in milliseconds. Or, you can even just pass the whole Response object back - might require a little more wiring in the protocol. Ask a devtools person about modifying the protocol for that route.
Started the CL here: https://codereview.chromium.org/2928833002/ Screenshot of the current changes is attached. Time is currently displayed in the 24h format.
Updated timestamp formatting
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7 commit d3ec2cc58603cc0578e7f3f17ddba5ff768303a7 Author: kristipark <kristipark@chromium.org> Date: Mon Jun 12 22:42:23 2017 [CacheStorage] [DevTools] Added "Time Received" column to cache storage data grid Screenshot of the change in the bug. Since the entry response time is given as an internal UTC format, I added wrapper methods to Time.h to convert it to standard UTC format. BUG= 727922 Review-Url: https://codereview.chromium.org/2928833002 Cr-Commit-Position: refs/heads/master@{#478797} [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-data.html [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/LayoutTests/http/tests/inspector/cache-storage/cache-storage-test.js [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/Source/core/inspector/browser_protocol.json [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkerCacheViews.js [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js [modify] https://crrev.com/d3ec2cc58603cc0578e7f3f17ddba5ff768303a7/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
Comment 1 by dmu...@chromium.org
, May 30 2017