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

Unified Diff: base/process/process_metrics.h

Issue 23155002: Implement ToValue() for SystemMetrics, SystemMemoryInfoKB, DiskInfo, and SwapInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@meminfo
Patch Set: removing rate stats, compute them later Created 7 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
« no previous file with comments | « no previous file | base/process/process_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics.h
diff --git a/base/process/process_metrics.h b/base/process/process_metrics.h
index 93296e37a62b6553e8c6a1a5f78f8d4e4abfc95b..cdff95120ff1ca8c602f0487e42d65912bd00606 100644
--- a/base/process/process_metrics.h
+++ b/base/process/process_metrics.h
@@ -15,6 +15,7 @@
#include "base/gtest_prod_util.h"
#include "base/process/process_handle.h"
#include "base/time/time.h"
+#include "base/values.h"
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -243,6 +244,9 @@ BASE_EXPORT extern const char kProcSelfExe[];
struct BASE_EXPORT SystemMemoryInfoKB {
SystemMemoryInfoKB();
+ // Serializes the platform specific fields to value.
+ Value* AsValue() const;
darin (slow to review) 2013/08/31 03:45:12 nit: this should return scoped_ptr<Value> nit: th
jwmak 2013/09/04 18:49:18 Done.
+
int total;
int free;
int buffers;
@@ -281,6 +285,9 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
struct BASE_EXPORT SystemDiskInfo {
SystemDiskInfo();
+ // Serializes the platform specific fields to value.
+ Value* AsValue() const;
darin (slow to review) 2013/08/31 03:45:12 ditto, same nits.
jwmak 2013/09/04 18:49:18 Done.
+
uint64 reads;
uint64 reads_merged;
uint64 sectors_read;
@@ -315,6 +322,9 @@ struct BASE_EXPORT SwapInfo {
mem_used_total(0) {
}
+ // Serializes the platform specific fields to value.
+ Value* AsValue() const;
+
uint64 num_reads;
uint64 num_writes;
uint64 compr_data_size;
@@ -336,6 +346,9 @@ class SystemMetrics {
static SystemMetrics Sample();
+ // Serializes the system metrics to value.
+ Value* AsValue() const;
+
private:
FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
« no previous file with comments | « no previous file | base/process/process_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698