Index: chrome/browser/performance_monitor/constants.h |
diff --git a/chrome/browser/performance_monitor/constants.h b/chrome/browser/performance_monitor/constants.h |
index 84681f9cc1315886a6ce0ecade79fbf05d3c5f26..edad421da78d98b2bb983adefbc0ca15d6d3906b 100644 |
--- a/chrome/browser/performance_monitor/constants.h |
+++ b/chrome/browser/performance_monitor/constants.h |
@@ -5,6 +5,9 @@ |
#ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |
#define CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |
+#include "base/basictypes.h" |
+#include "base/time.h" |
+ |
namespace performance_monitor { |
// Constants which are used by the PerformanceMonitor and its related classes. |
@@ -19,6 +22,21 @@ extern const int kDefaultGatherIntervalInSeconds; |
extern const char kStateChromeVersion[]; |
extern const char kStateProfilePrefix[]; |
+// Unit values (for use in metric, and on the UI side). |
+ |
+// Memory measurements |
+const int64 kBytesPerKilobyte = 1 << 10; |
Evan Stade
2012/09/14 08:39:16
define in cc
Devlin
2012/09/17 16:35:59
Done.
|
+const int64 kBytesPerMegabyte = kBytesPerKilobyte * (1 << 10); |
+const int64 kBytesPerGigabyte = kBytesPerMegabyte * (1 << 10); |
+const int64 kBytesPerTerabyte = kBytesPerGigabyte * (1 << 10); |
+ |
+// Time measurements - Most of these are imported from base/time.h |
+// These units are used for display (and it's related calculations), not for |
+// any mathematical analysis. Thus we can estimate for values without an exact |
+// conversion. |
+const int64 kMicrosecondsPerMonth = base::Time::kMicrosecondsPerDay * 30; |
+const int64 kMicrosecondsPerYear = base::Time::kMicrosecondsPerDay * 365; |
+ |
} // namespace performance_monitor |
#endif // CHROME_BROWSER_PERFORMANCE_MONITOR_CONSTANTS_H_ |