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

Side by Side Diff: components/metrics/profiler/tracking_synchronizer_observer.h

Issue 1021053003: Delivering the FIRST_NONEMPTY_PAINT phase changing event to base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@phase_splitting
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_ 5 #ifndef COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_
6 #define COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_ 6 #define COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 11 matching lines...) Expand all
22 namespace metrics { 22 namespace metrics {
23 23
24 // Set of profiling events, in no guaranteed order. Implemented as a vector 24 // Set of profiling events, in no guaranteed order. Implemented as a vector
25 // because we don't need to have an efficient .find() on it, so vector<> is more 25 // because we don't need to have an efficient .find() on it, so vector<> is more
26 // efficient. 26 // efficient.
27 typedef std::vector<ProfilerEventProto::ProfilerEvent> ProfilerEvents; 27 typedef std::vector<ProfilerEventProto::ProfilerEvent> ProfilerEvents;
28 28
29 // Observer for notifications from the TrackingSynchronizer class. 29 // Observer for notifications from the TrackingSynchronizer class.
30 class TrackingSynchronizerObserver { 30 class TrackingSynchronizerObserver {
31 public: 31 public:
32 // TODO(vadimt): Consider isherman@ idea: I'd change the phase_start and
33 // phase_finish from TimeDeltas to TimeTicks. And I'd omit the |past_events|
34 // list -- either in favor of a single ProfilerEvent that corresponds to the
35 // phase, or a method on the TrackingSynchronizer that can translate a
36 // profiling_phase to a ProfilerEvent.
37
38 // Received |process_data_phase| for profiling phase |profiling_phase| from a 32 // Received |process_data_phase| for profiling phase |profiling_phase| from a
39 // single process of |process_type|. The phase start and finish times, 33 // single process of |process_type|. The phase start and finish times,
40 // relative to the start time are |phase_start| and 34 // relative to the start time are |phase_start| and
41 // |phase_finish|. All profiling phases prior to the reported one have already 35 // |phase_finish|. All profiling phases prior to the reported one have already
42 // completed, and each completion was associated with an instance of 36 // completed, and each completion was associated with an instance of
43 // ProfilerEventProto::ProfilerEvent. |past_events| contains events associated 37 // ProfilerEventProto::ProfilerEvent. |past_events| contains events associated
44 // with completions of phases prior to the reported one. 38 // with completions of phases prior to the reported one.
45 // The observer should assume there might be more data coming until 39 // The observer should assume there might be more data coming until
46 // FinishedReceivingData() is called. 40 // FinishedReceivingData() is called.
47 virtual void ReceivedProfilerData( 41 virtual void ReceivedProfilerData(
(...skipping 14 matching lines...) Expand all
62 TrackingSynchronizerObserver() {} 56 TrackingSynchronizerObserver() {}
63 virtual ~TrackingSynchronizerObserver() {} 57 virtual ~TrackingSynchronizerObserver() {}
64 58
65 private: 59 private:
66 DISALLOW_COPY_AND_ASSIGN(TrackingSynchronizerObserver); 60 DISALLOW_COPY_AND_ASSIGN(TrackingSynchronizerObserver);
67 }; 61 };
68 62
69 } // namespace metrics 63 } // namespace metrics
70 64
71 #endif // COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_ 65 #endif // COMPONENTS_METRICS_PROFILER_TRACKING_SYNCHRONIZER_OBSERVER_H_
OLDNEW
« no previous file with comments | « components/metrics/profiler/tracking_synchronizer.cc ('k') | components/metrics/profiler/tracking_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698