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

Unified Diff: chrome/browser/ui/webui/performance_monitor/performance_monitor_ui_constants.cc

Issue 10915318: Revert 157168 - Add guards to metric values; erase bad events/metrics from db (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/performance_monitor/performance_monitor_ui_constants.cc
===================================================================
--- chrome/browser/ui/webui/performance_monitor/performance_monitor_ui_constants.cc (revision 157181)
+++ chrome/browser/ui/webui/performance_monitor/performance_monitor_ui_constants.cc (working copy)
@@ -5,13 +5,25 @@
#include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui_constants.h"
#include "base/logging.h"
-#include "chrome/browser/performance_monitor/constants.h"
#include "base/time.h"
namespace performance_monitor {
namespace {
+// Memory measurements
+const int64 kBytesPerKilobyte = 1 << 10;
+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;
+
// Keep this list synced with the enum declared in the .h file.
const UnitDetails kUnitDetailsList[] = {
{ UNIT_BYTES, MEASUREMENT_TYPE_MEMORY, 1 },

Powered by Google App Engine
This is Rietveld 408576698