| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/startup_metric_utils.h" | 5 #include "chrome/common/startup_metric_utils.h" |
| 6 | 6 |
| 7 #include "base/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/metrics/histogram_base.h" | 10 #include "base/metrics/histogram_base.h" |
| 11 #include "base/metrics/statistics_recorder.h" | 11 #include "base/metrics/statistics_recorder.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 SubsystemStartupTimeHash* hash = GetSubsystemStartupTimeHash(); | 152 SubsystemStartupTimeHash* hash = GetSubsystemStartupTimeHash(); |
| 153 // Only record the initial sample for a given histogram. | 153 // Only record the initial sample for a given histogram. |
| 154 if (hash->find(histogram_name_) != hash->end()) | 154 if (hash->find(histogram_name_) != hash->end()) |
| 155 return; | 155 return; |
| 156 | 156 |
| 157 (*hash)[histogram_name_] = | 157 (*hash)[histogram_name_] = |
| 158 base::TimeTicks::Now() - start_time_; | 158 base::TimeTicks::Now() - start_time_; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace startup_metric_utils | 161 } // namespace startup_metric_utils |
| OLD | NEW |