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

Side by Side Diff: components/html_viewer/stats_collection_controller.cc

Issue 1637493002: Add SameVersionStartupCounts suffix to startup HardFault and Temperature histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b1_startup_count_metric
Patch Set: back to _COUNT instead of _MAX Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/html_viewer/stats_collection_controller.h" 5 #include "components/html_viewer/stats_collection_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 tracing::StartupPerformanceTimesPtr times) { 28 tracing::StartupPerformanceTimesPtr times) {
29 base::StatisticsRecorder::Initialize(); 29 base::StatisticsRecorder::Initialize();
30 30
31 startup_metric_utils::RecordStartupProcessCreationTime( 31 startup_metric_utils::RecordStartupProcessCreationTime(
32 base::Time::FromInternalValue(times->shell_process_creation_time)); 32 base::Time::FromInternalValue(times->shell_process_creation_time));
33 33
34 // TODO(msw): Record the MojoMain() entry point time of mojo:browser instead? 34 // TODO(msw): Record the MojoMain() entry point time of mojo:browser instead?
35 startup_metric_utils::RecordMainEntryPointTime( 35 startup_metric_utils::RecordMainEntryPointTime(
36 base::Time::FromInternalValue(times->shell_main_entry_point_time)); 36 base::Time::FromInternalValue(times->shell_main_entry_point_time));
37 37
38 // TODO(msw): Determine if this is the first run. 38 // TODO(msw): Determine if this is the first run and provide a PrefService
39 // to generate stats that span multiple startups.
39 startup_metric_utils::RecordBrowserMainMessageLoopStart( 40 startup_metric_utils::RecordBrowserMainMessageLoopStart(
40 base::TimeTicks::FromInternalValue( 41 base::TimeTicks::FromInternalValue(
41 times->browser_message_loop_start_ticks), 42 times->browser_message_loop_start_ticks),
42 false); 43 false, nullptr);
43 44
44 startup_metric_utils::RecordBrowserWindowDisplay( 45 startup_metric_utils::RecordBrowserWindowDisplay(
45 base::TimeTicks::FromInternalValue(times->browser_window_display_ticks)); 46 base::TimeTicks::FromInternalValue(times->browser_window_display_ticks));
46 47
47 startup_metric_utils::RecordBrowserOpenTabsDelta( 48 startup_metric_utils::RecordBrowserOpenTabsDelta(
48 base::TimeDelta::FromInternalValue(times->browser_open_tabs_time_delta)); 49 base::TimeDelta::FromInternalValue(times->browser_open_tabs_time_delta));
49 50
50 startup_metric_utils::RecordFirstWebContentsMainFrameLoad( 51 startup_metric_utils::RecordFirstWebContentsMainFrameLoad(
51 base::TimeTicks::FromInternalValue( 52 base::TimeTicks::FromInternalValue(
52 times->first_web_contents_main_frame_load_ticks)); 53 times->first_web_contents_main_frame_load_ticks));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 histogram->WriteJSON(&histogram_json); 153 histogram->WriteJSON(&histogram_json);
153 return histogram_json; 154 return histogram_json;
154 } 155 }
155 156
156 std::string StatsCollectionController::GetBrowserHistogram( 157 std::string StatsCollectionController::GetBrowserHistogram(
157 const std::string& histogram_name) { 158 const std::string& histogram_name) {
158 return GetHistogram(histogram_name); 159 return GetHistogram(histogram_name);
159 } 160 }
160 161
161 } // namespace html_viewer 162 } // namespace html_viewer
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | components/startup_metric_utils/browser/startup_metric_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698