Index: remoting/base/process_resource_usage.h |
diff --git a/remoting/base/process_resource_usage.h b/remoting/base/process_resource_usage.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a6d39cdfa4ce990e6212a97f1a77472125faa8bb |
--- /dev/null |
+++ b/remoting/base/process_resource_usage.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2017 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 REMOTING_BASE_PROCESS_RESOURCE_USAGE_H_ |
+#define REMOTING_BASE_PROCESS_RESOURCE_USAGE_H_ |
+ |
+#include <stddef.h> |
+ |
+namespace remoting { |
+ |
+// A collection of the resource usage of a process. |
+struct ProcessResourceUsage { |
+ // Processor usage. It should be a consistent value on all platforms in |
+ // range of 0 to (100 * NumCPUCores). |
+ double processor_usage = 0; |
+ |
+ // Memory usage of working set. |
+ size_t working_set_size = 0; |
Sergey Ulanov
2017/03/27 19:43:20
Is it in bytes?
Hzj_jie
2017/03/30 01:09:45
Yes.
|
+ |
+ // Memory usage of page file. |
+ size_t pagefile_size = 0; |
+ |
+ // Merges the usage from |other| to |this|. |
+ void Append(const ProcessResourceUsage& other); |
Sergey Ulanov
2017/03/27 19:43:19
Call it Add(), since the order is irrelevant.
Hzj_jie
2017/03/30 01:09:45
Done.
|
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_BASE_PROCESS_RESOURCE_USAGE_H_ |