OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 "metrics_daemon.h" | 5 #include "metrics_daemon.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <base/file_util.h> | 9 #include <base/file_util.h> |
10 #include <base/logging.h> | 10 #include <base/logging.h> |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 ConfigureCrashIntervalReporter(kMetricKernelCrashIntervalName, | 204 ConfigureCrashIntervalReporter(kMetricKernelCrashIntervalName, |
205 &kernel_crash_interval_); | 205 &kernel_crash_interval_); |
206 ConfigureCrashIntervalReporter(kMetricUncleanShutdownIntervalName, | 206 ConfigureCrashIntervalReporter(kMetricUncleanShutdownIntervalName, |
207 &unclean_shutdown_interval_); | 207 &unclean_shutdown_interval_); |
208 ConfigureCrashIntervalReporter(kMetricUserCrashIntervalName, | 208 ConfigureCrashIntervalReporter(kMetricUserCrashIntervalName, |
209 &user_crash_interval_); | 209 &user_crash_interval_); |
210 | 210 |
211 DeleteFrequencyCounters(); | 211 DeleteFrequencyCounters(); |
212 ConfigureCrashFrequencyReporter(kMetricAnyCrashesDailyName); | 212 ConfigureCrashFrequencyReporter(kMetricAnyCrashesDailyName); |
213 ConfigureCrashFrequencyReporter(kMetricAnyCrashesDailyName); | |
214 ConfigureCrashFrequencyReporter(kMetricAnyCrashesWeeklyName); | 213 ConfigureCrashFrequencyReporter(kMetricAnyCrashesWeeklyName); |
215 ConfigureCrashFrequencyReporter(kMetricKernelCrashesDailyName); | 214 ConfigureCrashFrequencyReporter(kMetricKernelCrashesDailyName); |
216 ConfigureCrashFrequencyReporter(kMetricKernelCrashesWeeklyName); | 215 ConfigureCrashFrequencyReporter(kMetricKernelCrashesWeeklyName); |
217 ConfigureCrashFrequencyReporter(kMetricUncleanShutdownsDailyName); | 216 ConfigureCrashFrequencyReporter(kMetricUncleanShutdownsDailyName); |
218 ConfigureCrashFrequencyReporter(kMetricUncleanShutdownsWeeklyName); | 217 ConfigureCrashFrequencyReporter(kMetricUncleanShutdownsWeeklyName); |
219 ConfigureCrashFrequencyReporter(kMetricUserCrashesDailyName); | 218 ConfigureCrashFrequencyReporter(kMetricUserCrashesDailyName); |
220 ConfigureCrashFrequencyReporter(kMetricUserCrashesWeeklyName); | 219 ConfigureCrashFrequencyReporter(kMetricUserCrashesWeeklyName); |
221 | 220 |
222 // Don't setup D-Bus and GLib in test mode. | 221 // Don't setup D-Bus and GLib in test mode. |
223 if (testing) | 222 if (testing) |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 kMetricDailyUseTimeMax, | 506 kMetricDailyUseTimeMax, |
508 kMetricDailyUseTimeBuckets); | 507 kMetricDailyUseTimeBuckets); |
509 } | 508 } |
510 | 509 |
511 void MetricsDaemon::SendMetric(const string& name, int sample, | 510 void MetricsDaemon::SendMetric(const string& name, int sample, |
512 int min, int max, int nbuckets) { | 511 int min, int max, int nbuckets) { |
513 DLOG(INFO) << "received metric: " << name << " " << sample << " " | 512 DLOG(INFO) << "received metric: " << name << " " << sample << " " |
514 << min << " " << max << " " << nbuckets; | 513 << min << " " << max << " " << nbuckets; |
515 metrics_lib_->SendToUMA(name, sample, min, max, nbuckets); | 514 metrics_lib_->SendToUMA(name, sample, min, max, nbuckets); |
516 } | 515 } |
OLD | NEW |