Index: Source/core/dom/ScriptedIdleTaskController.cpp |
diff --git a/Source/core/dom/ScriptedIdleTaskController.cpp b/Source/core/dom/ScriptedIdleTaskController.cpp |
index 34b65b67840c7d0f1b3c7f15adeeba7604da28d3..d145f6dc2ed46bea77f154d882ddbb13b4351eb1 100644 |
--- a/Source/core/dom/ScriptedIdleTaskController.cpp |
+++ b/Source/core/dom/ScriptedIdleTaskController.cpp |
@@ -119,8 +119,14 @@ void ScriptedIdleTaskController::runCallback(CallbackId id, double deadlineSecon |
if (!callback) |
return; |
+ double allotedTimeMillis = std::max((deadlineSeconds - monotonicallyIncreasingTime()) * 1000, 0.0); |
+ Platform::current()->histogramCustomCounts("WebCore.ScriptedIdleTaskController.IdleCallbackDeadline", allotedTimeMillis, 0, 50, 50); |
jochen (gone - plz use gerrit)
2015/09/15 16:38:46
that looks like it's in seconds?
rmcilroy
2015/09/15 16:50:46
I don't think so. The seconds values are multiplie
jochen (gone - plz use gerrit)
2015/09/15 16:53:37
hum, ok, so you expect that there will be at most
Sami
2015/09/15 17:01:04
Right, that 50ms maximum required by the spec too.
rmcilroy
2015/09/15 17:03:23
Yup, the spec explicitly limits the maximum deadli
|
+ |
// TODO(rmcilroy): Add devtools tracing. |
callback->handleEvent(IdleDeadline::create(deadlineSeconds, callbackType)); |
+ |
+ double overrunMillis = std::max((monotonicallyIncreasingTime() - deadlineSeconds) * 1000, 0.0); |
+ Platform::current()->histogramCustomCounts("WebCore.ScriptedIdleTaskController.idleCallbackOverrunMs", overrunMillis, 0, 10000, 50); |
Sami
2015/09/15 16:58:44
"idle" isn't capitalized here but is above -- I gu
rmcilroy
2015/09/15 17:05:22
Argh, changed this locally but didn't upload. Than
rmcilroy
2015/09/15 17:19:50
Done.
|
} |
void ScriptedIdleTaskController::stop() |