Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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; | |
|
Peter Kasting
2017/03/24 22:39:18
It seems like the only reason we need these guards
gab
2017/03/27 15:21:43
Not sure it makes sense to test this outside an in
themblsha
2017/03/31 14:32:31
We generally try test Yandex-specific histograms a
gab
2017/04/03 16:18:25
Okay then I would argue for a single browser test
| |
| 777 | |
| 778 UMA_HISTOGRAM_WITH_TEMPERATURE(UMA_HISTOGRAM_LONG_TIMES_100, | |
| 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_WITH_TEMPERATURE( | |
|
gab
2017/03/27 15:21:43
Use UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE.
The
themblsha
2017/03/31 14:32:32
Done: https://bugs.chromium.org/p/chromium/issues/
| |
| 790 UMA_HISTOGRAM_LONG_TIMES_100, | |
| 791 "Startup.BrowserView.FirstPaint.CompositingEnded", | |
| 792 ticks - g_process_creation_ticks.Get()); | |
| 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 |
| OLD | NEW |