sduelund / mobitest-agent

Automatically exported from code.google.com/p/mobitest-agent
0 stars 0 forks source link

Capture periodic screenshots relative to first paint #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Periodic screenshots are captured relative to the run start, not the first 
paint callback, so sometimes we miss the first paint screen.  This is 
especially bad if our page loads quickly (<2 seconds) but our screenshots are 
infrequent (e.g. once per second).

This also causes some unrelated bugs, e.g. screenshot before first paint, a 
long delay until the first screenshot, etc.

Instead of capturing periodic screenshots relative to the run start time, the 
iOS BZAgent should capture a screenshot on the first paint callback and then 
periodically relative to the first paint time.

The agent should still capture the usual marker screens as before:
  1) on "startSession", to capture the initial "blank" screen
  2) on "startRender" (same as first paint callback?)
  3) on "docComplete"

Let's fix iOS first, then the other agents (Android/etc).

Original issue reported on code.google.com by z...@google.com on 26 Nov 2012 at 4:32

GoogleCodeExporter commented 8 years ago
If the paint notifications are reasonably accurate and complete then logic that 
matches the desktop agents would work well:

- run a 100ms timer
- when paint events come in, mark the screen as dirty
- when the timer fires, only capture a screen shot if the screen is marked as 
dirty

Some extra logic can be included to make sure we don't capture too frequently 
but that should allow for much better precision.

Original comment by pmee...@chromium.org on 26 Nov 2012 at 5:16

GoogleCodeExporter commented 8 years ago
- We can capture every 100ms, we just don't do it by default due to impact on 
load times (I've done it often in the simulator, though my unscientific 
impression is that it seems to impact load times there too)
- I don't think we track the "dirty" flag, since I'm not sure we have robust 
access to the paint event. We do calculate the dirty frames later before 
uploading them.

Original comment by guy...@gmail.com on 26 Nov 2012 at 5:24