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

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

Issue 139103007: Use TimeTicks instead of gettimeofday in ProcessMetrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reverty Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/process/process_metrics_freebsd.cc » ('j') | no next file with comments »
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 #if defined(OS_CHROMEOS) 198 #if defined(OS_CHROMEOS)
199 bool GetWorkingSetKBytesTotmaps(WorkingSetKBytes *ws_usage) const; 199 bool GetWorkingSetKBytesTotmaps(WorkingSetKBytes *ws_usage) const;
200 #endif 200 #endif
201 201
202 ProcessHandle process_; 202 ProcessHandle process_;
203 203
204 int processor_count_; 204 int processor_count_;
205 205
206 // Used to store the previous times and CPU usage counts so we can 206 // Used to store the previous times and CPU usage counts so we can
207 // compute the CPU usage between calls. 207 // compute the CPU usage between calls.
208 int64 last_cpu_time_; 208 TimeTicks last_cpu_time_;
209 int64 last_system_time_; 209 int64 last_system_time_;
210 210
211 // Same thing for idle wakeups. 211 // Same thing for idle wakeups.
212 int64 last_idle_wakeups_time_; 212 TimeTicks last_idle_wakeups_time_;
213 int64 last_absolute_idle_wakeups_; 213 int64 last_absolute_idle_wakeups_;
214 214
215 #if !defined(OS_IOS) 215 #if !defined(OS_IOS)
216 #if defined(OS_MACOSX) 216 #if defined(OS_MACOSX)
217 // Queries the port provider if it's set. 217 // Queries the port provider if it's set.
218 mach_port_t TaskForPid(ProcessHandle process) const; 218 mach_port_t TaskForPid(ProcessHandle process) const;
219 219
220 PortProvider* port_provider_; 220 PortProvider* port_provider_;
221 #elif defined(OS_POSIX) 221 #elif defined(OS_POSIX)
222 // Jiffie count at the last_cpu_time_ we updated. 222 // Jiffie count at the last_cpu_time_ we updated.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 SystemDiskInfo disk_info_; 379 SystemDiskInfo disk_info_;
380 #endif 380 #endif
381 #if defined(OS_CHROMEOS) 381 #if defined(OS_CHROMEOS)
382 SwapInfo swap_info_; 382 SwapInfo swap_info_;
383 #endif 383 #endif
384 }; 384 };
385 385
386 } // namespace base 386 } // namespace base
387 387
388 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 388 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698