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

Side by Side Diff: chrome/browser/performance_monitor/constants.cc

Issue 10907121: Add guards to metric values; erase bad events/metrics from db (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_use_units
Patch Set: Estade's requests Created 8 years, 3 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 (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/browser/performance_monitor/constants.h" 5 #include "chrome/browser/performance_monitor/constants.h"
6 6
7 #include "base/time.h"
8
7 namespace performance_monitor { 9 namespace performance_monitor {
8 10
9 // TODO(chebert): i18n on all constants.
10
11 // The error message displayed when a metric's details are not found. 11 // The error message displayed when a metric's details are not found.
12 const char kMetricNotFoundError[] = "Metric details not found."; 12 const char kMetricNotFoundError[] = "Metric details not found.";
13 13
14 // Any metric that is not associated with a specific activity will use this as 14 // Any metric that is not associated with a specific activity will use this as
15 // its activity. 15 // its activity.
16 const char kProcessChromeAggregate[] = "chrome_aggregate"; 16 const char kProcessChromeAggregate[] = "chrome_aggregate";
17 17
18 // The default interval at which PerformanceMonitor performs its timed 18 // The default interval at which PerformanceMonitor performs its timed
19 // collections; this can be overridden by using the kPerformanceMonitorGathering 19 // collections; this can be overridden by using the kPerformanceMonitorGathering
20 // switch with an associated (positive integer) value. 20 // switch with an associated (positive integer) value.
21 const int kDefaultGatherIntervalInSeconds = 120; 21 const int kDefaultGatherIntervalInSeconds = 120;
22 22
23 // Tokens to retrieve state values from the database. 23 // Tokens to retrieve state values from the database.
24 24
25 // Stores information about the previous chrome version. 25 // Stores information about the previous chrome version.
26 const char kStateChromeVersion[] = "chrome_version"; 26 const char kStateChromeVersion[] = "chrome_version";
27 // The prefix to the state of a profile's name, to prevent any possible naming 27 // The prefix to the state of a profile's name, to prevent any possible naming
28 // collisions in the database. 28 // collisions in the database.
29 const char kStateProfilePrefix[] = "profile"; 29 const char kStateProfilePrefix[] = "profile";
30 30
31 // Unit values
32 // Memory measurements
33 const int64 kBytesPerKilobyte = 1 << 10;
34 const int64 kBytesPerMegabyte = kBytesPerKilobyte * (1 << 10);
35 const int64 kBytesPerGigabyte = kBytesPerMegabyte * (1 << 10);
36 const int64 kBytesPerTerabyte = kBytesPerGigabyte * (1 << 10);
37
38 // Time measurements
39 const int64 kMicrosecondsPerMonth = base::Time::kMicrosecondsPerDay * 30;
40 const int64 kMicrosecondsPerYear = base::Time::kMicrosecondsPerDay * 365;
41
42
31 } // namespace performance_monitor 43 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/performance_monitor/constants.h ('k') | chrome/browser/performance_monitor/database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698