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

Side by Side Diff: components/startup_metric_utils/browser/startup_metric_utils.cc

Issue 2773973002: Add Startup.BrowserView.FirstPaint / .CompositingEnded histograms. (Closed)
Patch Set: Add Cocoa "compatibility", fix remarks. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/startup_metric_utils/browser/startup_metric_utils.h" 5 #include "components/startup_metric_utils/browser/startup_metric_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return; 762 return;
763 763
764 base::StackSamplingProfiler::SetProcessMilestone( 764 base::StackSamplingProfiler::SetProcessMilestone(
765 metrics::CallStackProfileMetricsProvider::MAIN_NAVIGATION_FINISHED); 765 metrics::CallStackProfileMetricsProvider::MAIN_NAVIGATION_FINISHED);
766 UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT( 766 UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
767 UMA_HISTOGRAM_LONG_TIMES_100, 767 UMA_HISTOGRAM_LONG_TIMES_100,
768 "Startup.FirstWebContents.MainNavigationFinished", 768 "Startup.FirstWebContents.MainNavigationFinished",
769 g_process_creation_ticks.Get(), ticks); 769 g_process_creation_ticks.Get(), ticks);
770 } 770 }
771 771
772 void RecordBrowserViewFirstPaint(const base::TimeTicks& ticks) {
773 static bool is_first_call = true;
774 if (!is_first_call || ticks.is_null())
775 return;
776 is_first_call = false;
777
778 UMA_HISTOGRAM_WITH_TEMPERATURE(UMA_HISTOGRAM_LONG_TIMES_100,
gab 2017/04/04 20:44:21 UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE for this
themblsha 2017/04/05 13:20:08 Done.
779 "Startup.BrowserView.FirstPaint",
780 ticks - g_process_creation_ticks.Get());
781 }
782
783 void RecordBrowserViewFirstPaintCompositingEnded(const base::TimeTicks& ticks) {
784 static bool is_first_call = true;
785 if (!is_first_call || ticks.is_null())
786 return;
787 is_first_call = false;
788
789 UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE(
790 UMA_HISTOGRAM_LONG_TIMES_100,
791 "Startup.BrowserView.FirstPaint.CompositingEnded",
792 g_process_creation_ticks.Get(), ticks);
793 }
794
772 base::TimeTicks MainEntryPointTicks() { 795 base::TimeTicks MainEntryPointTicks() {
773 return g_browser_main_entry_point_ticks.Get(); 796 return g_browser_main_entry_point_ticks.Get();
774 } 797 }
775 798
776 } // namespace startup_metric_utils 799 } // namespace startup_metric_utils
OLDNEW
« no previous file with comments | « components/startup_metric_utils/browser/startup_metric_utils.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698