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

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

Issue 10860017: Refactor Metrics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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..fae23fffa3016e87b4a4516daa0455c80744640e
--- /dev/null
+++ b/chrome/browser/performance_monitor/metric.h
@@ -0,0 +1,42 @@
+// 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 messages/functions in generated_resources.grd and in
+// chrome/browser/ui/webui/performance_monitor/l10n_util.
+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_

Powered by Google App Engine
This is Rietveld 408576698