added time to interactive metrics, refactored metrics to use traits

changed task macro to take pipeline info
This commit is contained in:
ddh 2017-10-02 14:52:39 +01:00
parent 347176df25
commit 2ffbe53989
26 changed files with 730 additions and 138 deletions

View file

@ -37,6 +37,7 @@ impl TaskSource for DOMManipulationTaskSource {
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::ScriptEvent,
Box::new(canceller.wrap_task(task)),
None //TODO
));
self.0.send(msg).map_err(|_| ())
}

View file

@ -30,6 +30,7 @@ impl TaskSource for FileReadingTaskSource {
self.0.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::FileRead,
Box::new(canceller.wrap_task(task)),
None //TODO
))
}
}

View file

@ -27,6 +27,7 @@ impl TaskSource for NetworkingTaskSource {
self.0.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::NetworkEvent,
Box::new(canceller.wrap_task(task)),
None
))
}
}
@ -41,6 +42,7 @@ impl NetworkingTaskSource {
self.0.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::NetworkEvent,
Box::new(task),
None //TODO
))
}
}

View file

@ -40,7 +40,8 @@ impl TaskSource for PerformanceTimelineTaskSource {
{
let msg = CommonScriptMsg::Task(
ScriptThreadEventCategory::PerformanceTimelineTask,
Box::new(canceller.wrap_task(task))
Box::new(canceller.wrap_task(task)),
None
);
self.0.send(msg).map_err(|_| ())
}

View file

@ -37,6 +37,7 @@ impl TaskSource for UserInteractionTaskSource {
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::InputEvent,
Box::new(canceller.wrap_task(task)),
None
));
self.0.send(msg).map_err(|_| ())
}