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

Unified Diff: components/metrics/profiler/profiler_metrics_provider.h

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Fixing Android compile errors. Created 5 years, 9 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 | « components/metrics/profiler/DEPS ('k') | components/metrics/profiler/profiler_metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/profiler/profiler_metrics_provider.h
diff --git a/components/metrics/profiler/profiler_metrics_provider.h b/components/metrics/profiler/profiler_metrics_provider.h
index 5b79b8889d7b5fccc83bcd7574d0f8e6cb9dcb56..7740cb80b1a0d2faa18e0a2f6713632fbd1f2fd5 100644
--- a/components/metrics/profiler/profiler_metrics_provider.h
+++ b/components/metrics/profiler/profiler_metrics_provider.h
@@ -8,10 +8,12 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "components/metrics/metrics_provider.h"
+#include "components/metrics/profiler/tracking_synchronizer_observer.h"
#include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
+#include "content/public/common/process_type.h"
namespace tracked_objects {
-struct ProcessDataSnapshot;
+struct ProcessDataPhaseSnapshot;
}
namespace metrics {
@@ -32,8 +34,13 @@ class ProfilerMetricsProvider : public MetricsProvider {
// Records the passed profiled data, which should be a snapshot of the
// browser's profiled performance during startup for a single process.
void RecordProfilerData(
- const tracked_objects::ProcessDataSnapshot& process_data,
- int process_type);
+ const tracked_objects::ProcessDataPhaseSnapshot& process_data,
+ base::ProcessId process_id,
+ content::ProcessType process_type,
+ int profiling_phase,
+ base::TimeDelta phase_start,
+ base::TimeDelta phase_finish,
+ const ProfilerEvents& past_events);
private:
// Returns whether current connection is cellular or not according to the
@@ -41,12 +48,10 @@ class ProfilerMetricsProvider : public MetricsProvider {
bool IsCellularConnection();
// Saved cache of generated Profiler event protos, to be copied into the UMA
- // proto when ProvideGeneralMetrics() is called.
- ProfilerEventProto profiler_event_cache_;
-
- // True if this instance has recorded profiler data since the last call to
- // ProvideGeneralMetrics().
- bool has_profiler_data_;
+ // proto when ProvideGeneralMetrics() is called. The map is from a profiling
+ // phase id to the profiler event proto that represents profiler data for the
+ // profiling phase.
+ std::map<int, ProfilerEventProto> profiler_events_cache_;
// Callback function used to get current network connection type.
base::Callback<void(bool*)> cellular_callback_;
« no previous file with comments | « components/metrics/profiler/DEPS ('k') | components/metrics/profiler/profiler_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698