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

Unified Diff: content/browser/download/mhtml_generation_manager.cc

Issue 2413473004: UMA histogram for longest renderer main thread usage for page save to MHTML. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/mhtml_generation_manager.cc
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 1e8b0549fd35007c849f387da6435a114ffbb594..bcda9fed2828254e28e3912860724a7375344f80 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -106,6 +106,7 @@ class MHTMLGenerationManager::Job : public RenderProcessHostObserver {
base::TimeTicks wait_on_renderer_start_time_;
base::TimeDelta all_renderers_wait_time_;
base::TimeDelta all_renderers_main_thread_time_;
+ base::TimeDelta longest_renderer_main_thread_time_;
// User-configurable parameters. Includes the file location, binary encoding
// choices, and whether to skip storing resources marked
@@ -282,6 +283,11 @@ void MHTMLGenerationManager::Job::MarkAsFinished() {
"PageSerialization.MhtmlGeneration.RendererMainThreadTime.FrameTree",
all_renderers_main_thread_time_);
}
+ if (!longest_renderer_main_thread_time_.is_zero()) {
+ UMA_HISTOGRAM_TIMES(
+ "PageSerialization.MhtmlGeneration.RendererMainThreadTime.SlowestFrame",
+ longest_renderer_main_thread_time_);
+ }
// Stopping RenderProcessExited notifications is needed to avoid calling
// JobFinished twice. See also https://crbug.com/612098.
@@ -293,6 +299,8 @@ void MHTMLGenerationManager::Job::ReportRendererMainThreadTime(
DCHECK(renderer_main_thread_time > base::TimeDelta());
if (renderer_main_thread_time > base::TimeDelta())
all_renderers_main_thread_time_ += renderer_main_thread_time;
+ if (renderer_main_thread_time > longest_renderer_main_thread_time_)
+ longest_renderer_main_thread_time_ = renderer_main_thread_time;
}
void MHTMLGenerationManager::Job::AddFrame(RenderFrameHost* render_frame_host) {
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698