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

Side by Side Diff: components/metrics/metrics_service.cc

Issue 1485763002: Merge multiple histogram snapshots into single one for reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: Change 'inconsistencies' from int to unsigned. Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It is 10 // A MetricsService instance is typically created at application startup. It is
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 log->RecordEnvironment(metrics_providers_.get(), synthetic_trials, 1104 log->RecordEnvironment(metrics_providers_.get(), synthetic_trials,
1105 GetInstallDate(), GetMetricsReportingEnabledDate()); 1105 GetInstallDate(), GetMetricsReportingEnabledDate());
1106 } 1106 }
1107 1107
1108 void MetricsService::RecordCurrentHistograms() { 1108 void MetricsService::RecordCurrentHistograms() {
1109 DCHECK(log_manager_.current_log()); 1109 DCHECK(log_manager_.current_log());
1110 // "true" indicates that StatisticsRecorder should include histograms in 1110 // "true" indicates that StatisticsRecorder should include histograms in
1111 // persistent storage. 1111 // persistent storage.
1112 histogram_snapshot_manager_.PrepareDeltas( 1112 histogram_snapshot_manager_.PrepareDeltas(
1113 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(), 1113 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(),
1114 base::Histogram::kNoFlags, base::Histogram::kUmaTargetedHistogramFlag); 1114 base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag);
1115 } 1115 }
1116 1116
1117 void MetricsService::RecordCurrentStabilityHistograms() { 1117 void MetricsService::RecordCurrentStabilityHistograms() {
1118 DCHECK(log_manager_.current_log()); 1118 DCHECK(log_manager_.current_log());
1119 // "true" indicates that StatisticsRecorder should include histograms in 1119 // "true" indicates that StatisticsRecorder should include histograms in
1120 // persistent storage. 1120 // persistent storage.
1121 histogram_snapshot_manager_.PrepareDeltas( 1121 histogram_snapshot_manager_.PrepareDeltas(
1122 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(), 1122 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(),
1123 base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag); 1123 base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag);
1124 } 1124 }
(...skipping 27 matching lines...) Expand all
1152 base::Time::Now().ToTimeT()); 1152 base::Time::Now().ToTimeT());
1153 } 1153 }
1154 1154
1155 void MetricsService::SkipAndDiscardUpload() { 1155 void MetricsService::SkipAndDiscardUpload() {
1156 log_manager_.DiscardStagedLog(); 1156 log_manager_.DiscardStagedLog();
1157 scheduler_->UploadCancelled(); 1157 scheduler_->UploadCancelled();
1158 log_upload_in_progress_ = false; 1158 log_upload_in_progress_ = false;
1159 } 1159 }
1160 1160
1161 } // namespace metrics 1161 } // namespace metrics
OLDNEW
« base/metrics/statistics_recorder.cc ('K') | « components/metrics/metrics_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698