Allow asynchronous measurements

NEW
Unassigned

Status

Testing Graveyard
Peptest
6 years ago
4 months ago

People

(Reporter: mcote, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
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.

Updated

4 months ago
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.