Closed Bug 767055 Opened 12 years ago Closed 1 month ago

Allow asynchronous measurements

Categories

(Testing Graveyard :: Peptest, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcote, Unassigned)

Details

Right now, performAction() is synchronous, meaning that we can't really wait for asynchronous events while recording responsiveness.

We should have calls to start and stop recording responsiveness (automatically terminated at the end of the test). Then we can set up callbacks to listen for events. This should also help us get rid of sleep calls.
So I may be wrong, but I think we already have that capability thanks to Mozmill's waitFor method.

https://github.com/mozautomation/mozmill/blob/master/mozmill/mozmill/extension/resource/stdlib/utils.js#L395

This method waits for a function to return "true" and is called like:
controller.waitFor(function() { return some_boolean_expression; });

Both waitFor and sleep use nsIThreadManager to get the current thread and then call thread.processNextEvent(). I'm not 100% sure if this is what we actually want or not though.
Product: Testing → Testing Graveyard
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.