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

Side by Side Diff: base/process/process_metrics.h

Issue 1433603004: Add ProcessMetrics::CreateCurrentProcessMetrics() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a_counter_with_ts
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/process/process_metrics.cc » ('j') | base/process/process_metrics.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains routines for gathering resource statistics for processes 5 // This file contains routines for gathering resource statistics for processes
6 // running on the system. 6 // running on the system.
7 7
8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ 8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_
9 #define BASE_PROCESS_PROCESS_METRICS_H_ 9 #define BASE_PROCESS_PROCESS_METRICS_H_
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 static ProcessMetrics* CreateProcessMetrics(ProcessHandle process); 103 static ProcessMetrics* CreateProcessMetrics(ProcessHandle process);
104 #else 104 #else
105 105
106 // The port provider needs to outlive the ProcessMetrics object returned by 106 // The port provider needs to outlive the ProcessMetrics object returned by
107 // this function. If NULL is passed as provider, the returned object 107 // this function. If NULL is passed as provider, the returned object
108 // only returns valid metrics if |process| is the current process. 108 // only returns valid metrics if |process| is the current process.
109 static ProcessMetrics* CreateProcessMetrics(ProcessHandle process, 109 static ProcessMetrics* CreateProcessMetrics(ProcessHandle process,
110 PortProvider* port_provider); 110 PortProvider* port_provider);
111 #endif // !defined(OS_MACOSX) || defined(OS_IOS) 111 #endif // !defined(OS_MACOSX) || defined(OS_IOS)
112 112
113 // Creates a ProcessMetrics for the current process.
Lei Zhang 2015/11/09 19:24:51 Maybe mention this is just a cross-platform conven
fdoray 2015/11/10 19:30:27 Done.
114 // The caller owns the returned object.
115 static ProcessMetrics* CreateCurrentProcessMetrics();
116
113 // Returns the current space allocated for the pagefile, in bytes (these pages 117 // Returns the current space allocated for the pagefile, in bytes (these pages
114 // may or may not be in memory). On Linux, this returns the total virtual 118 // may or may not be in memory). On Linux, this returns the total virtual
115 // memory size. 119 // memory size.
116 size_t GetPagefileUsage() const; 120 size_t GetPagefileUsage() const;
117 // Returns the peak space allocated for the pagefile, in bytes. 121 // Returns the peak space allocated for the pagefile, in bytes.
118 size_t GetPeakPagefileUsage() const; 122 size_t GetPeakPagefileUsage() const;
119 // Returns the current working set size, in bytes. On Linux, this returns 123 // Returns the current working set size, in bytes. On Linux, this returns
120 // the resident set size. 124 // the resident set size.
121 size_t GetWorkingSetSize() const; 125 size_t GetWorkingSetSize() const;
122 // Returns the peak working set size, in bytes. 126 // Returns the peak working set size, in bytes.
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 SystemDiskInfo disk_info_; 398 SystemDiskInfo disk_info_;
395 #endif 399 #endif
396 #if defined(OS_CHROMEOS) 400 #if defined(OS_CHROMEOS)
397 SwapInfo swap_info_; 401 SwapInfo swap_info_;
398 #endif 402 #endif
399 }; 403 };
400 404
401 } // namespace base 405 } // namespace base
402 406
403 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 407 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics.cc » ('j') | base/process/process_metrics.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698