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

Issue 2364923004: Add UMA histograms to MHTML save operations. (Closed)

Created:
4 years, 3 months ago by carlosk
Modified:
4 years, 2 months ago
CC:
asanka, asvitkine+watch_chromium.org, blink-reviews, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dcheng, jam, kinuko+watch, Łukasz Anforowicz, mlamouri+watch-blink_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add UMA histograms to MHTML save operations. In the context of the Offline project we need more information on how the MHTML save operation is performing, especially in regards to how much it is interfering with the render process main thread. This change adds UMA histograms to track the performance of the costlier operations performed when a page is being saved to MHTML. One new "PageSerialization" category was added to encompass serialization generically and a "MhtmlGeneration" sub-category for the MHTML specific parts. All histograms added in this batch are timing measurements and they map closely to the tracing instrumentation under the "page-serialization" category. Following is the list of them with indentation to indicate what encompasses what: For the complete page saving operation: PageSerialization.MhtmlGeneration.FullPageSavingTime PageSerialization.MhtmlGeneration.BrowserWaitForRendererTime.FrameTree PageSerialization.MhtmlGeneration.RendererMainThreadTime.FrameTree For a single frame in a page saving operation: PageSerialization.MhtmlGeneration.BrowserWaitForRendererTime.SingleFrame PageSerialization.MhtmlGeneration.RendererMainThreadTime.SingleFrame PageSerialization.MhtmlGeneration.SerializationTime.SingleFrame PageSerialization.SerializationTime.Html *PageSerialization.SerializationTime.CSSElement *PageSerialization.SerializationTime.ImageElement PageSerialization.MhtmlGeneration.EncodingTime.SingleFrame PageSerialization.MhtmlGeneration.WriteToDiskTime.SingleFrame *: may be executed many times under its parent. BUG=645686 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/0f5a7e209836a0d22f7ae69ff7729da2a1fccf3e Cr-Commit-Position: refs/heads/master@{#421989}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixed error causing MHTMLGenerationTest to fail. #

Total comments: 15

Patch Set 3 : Updated histogram names and descriptions; better time multiplier format. #

Patch Set 4 : Ugly line breaks. #

Total comments: 4

Patch Set 5 : Rebase only. #

Patch Set 6 : Reverted accidental histogram removal. #

Total comments: 8

Patch Set 7 : Address code review comments. #

Total comments: 6

Patch Set 8 : Address code review comments. #

Patch Set 9 : Address code review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -50 lines) Patch
M content/browser/download/mhtml_generation_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/mhtml_generation_manager.cc View 1 2 3 4 5 6 11 chunks +62 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 3 chunks +28 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameSerializer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameSerializer.cpp View 1 2 3 4 5 6 7 8 7 chunks +40 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializer.cpp View 1 2 3 chunks +22 lines, -15 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 1 chunk +95 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 53 (35 generated)
carlosk
https://codereview.chromium.org/2364923004/diff/1/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2364923004/diff/1/content/browser/download/mhtml_generation_manager.cc#newcode288 content/browser/download/mhtml_generation_manager.cc:288: if (renderer_main_thread_time > base::TimeDelta()) This is here to avoid ...
4 years, 3 months ago (2016-09-24 01:30:22 UTC) #9
carlosk
https://codereview.chromium.org/2364923004/diff/1/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2364923004/diff/1/content/browser/download/mhtml_generation_manager.cc#newcode288 content/browser/download/mhtml_generation_manager.cc:288: if (renderer_main_thread_time > base::TimeDelta()) This is here to avoid ...
4 years, 3 months ago (2016-09-24 01:30:22 UTC) #10
carlosk
nasko@: Please review changes in content/*. dglazkov@: Please review changes in third_party/WebKit/*. isherman@: Please review ...
4 years, 3 months ago (2016-09-24 01:32:24 UTC) #11
Ilya Sherman
https://codereview.chromium.org/2364923004/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp File third_party/WebKit/Source/core/frame/FrameSerializer.cpp (right): https://codereview.chromium.org/2364923004/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp#newcode443 third_party/WebKit/Source/core/frame/FrameSerializer.cpp:443: imageHistogram.count(static_cast<int64_t>((WTF::monotonicallyIncreasingTime() - imageStartTime) * 1000000)); nit: Are there any ...
4 years, 3 months ago (2016-09-24 02:53:52 UTC) #14
carlosk
Thanks Ilya. I did an overhaul of histogram names and descriptions and they do look ...
4 years, 2 months ago (2016-09-27 21:07:30 UTC) #24
Ilya Sherman
Thanks, this is much clearer now =) LGTM https://codereview.chromium.org/2364923004/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp File third_party/WebKit/Source/core/frame/FrameSerializer.cpp (right): https://codereview.chromium.org/2364923004/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp#newcode443 third_party/WebKit/Source/core/frame/FrameSerializer.cpp:443: imageHistogram.count(static_cast<int64_t>((WTF::monotonicallyIncreasingTime() ...
4 years, 2 months ago (2016-09-28 00:42:16 UTC) #27
carlosk
Thanks. https://codereview.chromium.org/2364923004/diff/60001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2364923004/diff/60001/content/browser/download/mhtml_generation_manager.cc#newcode268 content/browser/download/mhtml_generation_manager.cc:268: renderer_wait_time); On 2016/09/28 00:42:16, Ilya Sherman wrote: > ...
4 years, 2 months ago (2016-09-28 17:02:44 UTC) #28
Łukasz Anforowicz
LGTM with some nits and suggestions. https://codereview.chromium.org/2364923004/diff/100001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2364923004/diff/100001/content/browser/download/mhtml_generation_manager.cc#newcode47 content/browser/download/mhtml_generation_manager.cc:47: const base::TimeTicks creation_time() ...
4 years, 2 months ago (2016-09-28 19:38:40 UTC) #30
carlosk
Thanks. https://codereview.chromium.org/2364923004/diff/100001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/2364923004/diff/100001/content/browser/download/mhtml_generation_manager.cc#newcode47 content/browser/download/mhtml_generation_manager.cc:47: const base::TimeTicks creation_time() { return creation_time_; } On ...
4 years, 2 months ago (2016-09-28 21:07:49 UTC) #32
nasko
IPC LGTM, content/ rubberstamp based on lukasza@'s review.
4 years, 2 months ago (2016-09-28 22:16:25 UTC) #34
dglazkov
https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp File third_party/WebKit/Source/core/frame/FrameSerializer.cpp (right): https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp#newcode323 third_party/WebKit/Source/core/frame/FrameSerializer.cpp:323: cssStartTime = WTF::monotonicallyIncreasingTime(); shouldn't need WTF:: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/wtf/CurrentTime.h?rcl=0&l=71 https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp#newcode356 third_party/WebKit/Source/core/frame/FrameSerializer.cpp:356: ...
4 years, 2 months ago (2016-09-29 04:02:55 UTC) #37
carlosk
Thanks. https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp File third_party/WebKit/Source/core/frame/FrameSerializer.cpp (right): https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp#newcode323 third_party/WebKit/Source/core/frame/FrameSerializer.cpp:323: cssStartTime = WTF::monotonicallyIncreasingTime(); On 2016/09/29 04:02:55, dglazkov wrote: ...
4 years, 2 months ago (2016-09-29 18:24:11 UTC) #39
dglazkov
On 2016/09/29 at 18:24:11, carlosk wrote: > Thanks. > > https://codereview.chromium.org/2364923004/diff/120001/third_party/WebKit/Source/core/frame/FrameSerializer.cpp > File third_party/WebKit/Source/core/frame/FrameSerializer.cpp (right): ...
4 years, 2 months ago (2016-09-29 18:41:33 UTC) #41
carlosk
On 2016/09/29 18:41:33, dglazkov wrote: > On 2016/09/29 at 18:24:11, carlosk wrote: > > > ...
4 years, 2 months ago (2016-09-29 19:00:55 UTC) #43
dglazkov
lgtm
4 years, 2 months ago (2016-09-29 19:05:13 UTC) #45
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/2364923004/160001
4 years, 2 months ago (2016-09-30 00:07:56 UTC) #50
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-09-30 00:17:07 UTC) #51
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 00:22:00 UTC) #53
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/0f5a7e209836a0d22f7ae69ff7729da2a1fccf3e
Cr-Commit-Position: refs/heads/master@{#421989}

Powered by Google App Engine
This is Rietveld 408576698