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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h

Issue 2788013003: Expected Queueing Time Metric ignores tasks with nested message loops. (Closed)
Patch Set: Address nits Created 3 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
Index: third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h b/third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h
index f10f23199d4b15974e56950205761444a82461e8..d3dd0c694aac825faad8a0df82cdb85567a2153c 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h
@@ -29,15 +29,18 @@ class BLINK_PLATFORM_EXPORT QueueingTimeEstimator {
class State {
public:
+ void OnTopLevelTaskStarted(base::TimeTicks task_start_time);
+ void OnTopLevelTaskCompleted(Client* client, base::TimeTicks task_end_time);
+ void OnBeginNestedMessageLoop();
+
base::TimeDelta current_expected_queueing_time;
base::TimeDelta window_duration;
base::TimeTicks window_start_time;
base::TimeTicks current_task_start_time;
- void OnTopLevelTaskStarted(base::TimeTicks task_start_time);
- void OnTopLevelTaskCompleted(Client* client, base::TimeTicks task_end_time);
private:
bool TimePastWindowEnd(base::TimeTicks task_end_time);
+ bool in_nested_message_loop_ = false;
};
QueueingTimeEstimator(Client* client, base::TimeDelta window_duration);
@@ -45,6 +48,7 @@ class BLINK_PLATFORM_EXPORT QueueingTimeEstimator {
void OnTopLevelTaskStarted(base::TimeTicks task_start_time);
void OnTopLevelTaskCompleted(base::TimeTicks task_end_time);
+ void OnBeginNestedMessageLoop();
// Returns all state except for the current |client_|.
const State& state() const { return state_; }

Powered by Google App Engine
This is Rietveld 408576698