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

Unified Diff: chrome/browser/task_manager/sampling/task_group.h

Issue 2573183002: Add process start time and CPU time columns to task manager (Closed)
Patch Set: Fix nits and conflicts. Created 3 years, 11 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/task_manager/sampling/task_group.h
diff --git a/chrome/browser/task_manager/sampling/task_group.h b/chrome/browser/task_manager/sampling/task_group.h
index 9d7f76e1b2cb2e4815649a86748f0ac1d95f6c14..288c54f35e7581e0e50ab13701473220117d673c 100644
--- a/chrome/browser/task_manager/sampling/task_group.h
+++ b/chrome/browser/task_manager/sampling/task_group.h
@@ -15,6 +15,7 @@
#include "base/memory/memory_coordinator_client.h"
#include "base/memory/weak_ptr.h"
#include "base/process/process_handle.h"
+#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/task_manager/providers/task.h"
#include "chrome/browser/task_manager/sampling/task_group_sampler.h"
@@ -68,6 +69,8 @@ class TaskGroup {
bool empty() const { return tasks().empty(); }
double cpu_usage() const { return cpu_usage_; }
+ base::Time start_time() const { return start_time_; }
+ base::TimeDelta cpu_time() const { return cpu_time_; }
int64_t private_bytes() const { return memory_usage_.private_bytes; }
int64_t shared_bytes() const { return memory_usage_.shared_bytes; }
int64_t physical_bytes() const { return memory_usage_.physical_bytes; }
@@ -109,6 +112,10 @@ class TaskGroup {
void OnCpuRefreshDone(double cpu_usage);
+ void OnStartTimeRefreshDone(base::Time start_time);
+
+ void OnCpuTimeRefreshDone(base::TimeDelta cpu_time);
+
void OnPhysicalMemoryUsageRefreshDone(int64_t physical_bytes);
void OnMemoryUsageRefreshDone(MemoryUsageStats memory_usage);
@@ -145,6 +152,8 @@ class TaskGroup {
// The per process resources usages.
double cpu_usage_;
+ base::Time start_time_; // Only calculated On Windows now.
+ base::TimeDelta cpu_time_; // Only calculated On Windows now.
MemoryUsageStats memory_usage_;
int64_t gpu_memory_;
base::MemoryState memory_state_;
« no previous file with comments | « chrome/browser/task_manager/sampling/shared_sampler_win.cc ('k') | chrome/browser/task_manager/sampling/task_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698