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

Unified Diff: chrome/browser/performance_monitor/metric.h

Issue 10874041: Refactor Metrics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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/performance_monitor/metric.h
diff --git a/chrome/browser/performance_monitor/metric.h b/chrome/browser/performance_monitor/metric.h
new file mode 100644
index 0000000000000000000000000000000000000000..1417454f008c1741df606b00cac8e3f827f32711
--- /dev/null
+++ b/chrome/browser/performance_monitor/metric.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_
+#define CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_
+
+#include <string>
+#include "base/time.h"
+
+namespace performance_monitor {
+
+// IMPORTANT: This is used as an indication of the metric type within the
+// performance monitor database; do not change the order! If you add new
+// metric types to this list, place them above METRIC_NUMBER_OF_METRICS and add
+// the appropriate constants to metric_details.
+enum MetricType {
+METRIC_CPU_USAGE,
+METRIC_PRIVATE_MEMORY_USAGE,
+METRIC_SHARED_MEMORY_USAGE,
+METRIC_STARTUP_TIME,
+METRIC_TEST_STARTUP_TIME,
+METRIC_SESSION_RESTORE_TIME,
+METRIC_PAGE_LOAD_TIME,
+METRIC_NUMBER_OF_METRICS
+};
+
+struct Metric {
+ public:
+ Metric();
+ Metric(const base::Time& metric_time, const double metric_value);
+ Metric(const std::string& metric_time, const std::string& metric_value);
+ ~Metric();
+
+ base::Time time;
+ double value;
+};
+
+} // namespace performance_monitor
+
+#endif // CHROME_BROWSER_PERFORMANCE_MONITOR_METRIC_H_
« no previous file with comments | « chrome/browser/performance_monitor/database_unittest.cc ('k') | chrome/browser/performance_monitor/metric.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698