paulirish/speedline

SpeedIndex reported as 0 on sites with <=3 frames

Closed this issue · 2 comments

We're seeing some cases where speedindex is reporting 0. Typically happens with sites like airhorner.com and example.com which are very simple and may have only a few frames..

We've seen these sorts of results:

{
  'frames': [...],
  'first': 352,
  'complete': 352,
  'duration': 3417,
  'speedIndex': 352
}
{
  'frames': [...],
  'first': 310,
  'complete': 310,
  'duration': 3366,
  'speedIndex': 0
}

cc @brendankenny

Over in 9e64361 I added a few test cases for 1, 2, and 3 frame traces that are hard for speed index to reason about.

I've also started a branch that separates out our first/last frames in the object we pass around, so it's more clear which frame we're using.

screenshotevents...paulirish:oneframetraces