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

Unified Diff: components/metrics/metrics_service.cc

Issue 2936733002: Instrumentation to debug actions memory leak.
Patch Set: rebase Created 3 years, 6 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 | components/metrics/metrics_service_accessor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 6a44e35b51e90cf0bfb41295c5bcd7ad8be92fb1..fa0bce00631df4e74fac2478a1b6fb49152230bb 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -248,6 +248,7 @@ void MetricsService::InitializeMetricsRecordingState() {
base::Bind(&MetricsService::StartScheduledUpload,
self_ptr_factory_.GetWeakPtr());
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.InitiateRecording", true);
rotation_scheduler_.reset(new MetricsRotationScheduler(
upload_callback,
// MetricsServiceClient outlives MetricsService, and
@@ -260,6 +261,7 @@ void MetricsService::InitializeMetricsRecordingState() {
}
void MetricsService::Start() {
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.MetricsService.Start", true);
HandleIdleSinceLastTransmission(false);
EnableRecording();
EnableReporting();
@@ -280,6 +282,7 @@ void MetricsService::Stop() {
void MetricsService::EnableReporting() {
if (reporting_service_.reporting_active())
return;
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.EnableReporting", true);
reporting_service_.EnableReporting();
StartSchedulerIfNecessary();
}
@@ -309,6 +312,7 @@ void MetricsService::EnableRecording() {
if (recording_state_ == ACTIVE)
return;
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.EnableRecording", true);
recording_state_ = ACTIVE;
state_manager_->ForceClientIdCreation();
@@ -614,6 +618,7 @@ void MetricsService::NotifyOnDidCreateMetricsLog() {
void MetricsService::OpenNewLog() {
DCHECK(!log_manager_.current_log());
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.OpenNewLog", true);
log_manager_.BeginLoggingWithLog(CreateLog(MetricsLog::ONGOING_LOG));
NotifyOnDidCreateMetricsLog();
@@ -643,6 +648,7 @@ void MetricsService::StartInitTask() {
void MetricsService::CloseCurrentLog() {
if (!log_manager_.current_log())
return;
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.CloseCurrentLog", true);
// If a persistent allocator is in use, update its internal histograms (such
// as how much memory is being used) before reporting.
@@ -804,6 +810,7 @@ bool MetricsService::PrepareInitialStabilityLog(
void MetricsService::PrepareInitialMetricsLog() {
DCHECK_EQ(INIT_TASK_DONE, state_);
+ UMA_HISTOGRAM_BOOLEAN("UMA.Dbg.PrepareInitialMetricsLog", true);
RecordCurrentEnvironment(initial_metrics_log_.get());
base::TimeDelta incremental_uptime;
« no previous file with comments | « no previous file | components/metrics/metrics_service_accessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698