I have some boomerang data that is being collected, however the frame rate data this coming back doesn't make sense to me.
My two main questions are
First I'll give the complete beacon I am seeing
c.e: "kb8jhepo"
c.f: 61
c.f.d: 524
c.f.m: 2
c.f.s: "kb8jhge3"
c.t.fps: "0*5*62"
c.tti: 2075
c.tti.m: "lt"
c.tti.vr: 948
if: ""
n: 1
nt_con_end: 1591744341954
nt_con_st: 1591744341954
nt_dec_size: 129958
nt_dns_end: 1591744341954
nt_dns_st: 1591744341954
nt_domcomp: 1591744343076
nt_domcontloaded_end: 1591744342895
nt_domcontloaded_st: 1591744342814
nt_domint: 1591744342577
nt_domloading: 1591744342159
nt_enc_size: 41324
nt_fet_st: 1591744341954
nt_first_paint: 1591744342325
nt_load_end: 1591744343120
nt_load_st: 1591744343082
nt_nav_st: 1591744341948
nt_nav_type: 1
nt_protocol: "h2"
nt_red_cnt: 0
nt_req_st: 1591744341964
nt_res_end: 1591744342373
nt_res_st: 1591744342144
nt_ssl_st: 1591744341954
nt_trn_size: 42860
nt_unload_end: 1591744342154
nt_unload_st: 1591744342154
pid: "a6ilbd4j"
pt.fcp: 377
pt.fp: 377
rt.si: "kd7mvv6mutl-NaN"
rt.sl: 0
rt.ss: undefined
ua.plt: "MacIntel"
ua.vnd: "Google Inc."
v: "1.0.0"
vis.st: "visible"
On the doc the algorithm calculating TTI is summarized w/
Putting these two timers together, here's how we measure Visually Ready and Time to Interactive:
1. Determine the highest Visually Ready timestamp (VRTS):
* Largest Contentful Paint (if available)
* First Contentful Paint (if available)
* First Paint (if available)
* domContentLoadedEventEnd
* Hero Images are loaded (if configured)
* Framework Ready (if configured)
2. After VRTS, calculate Time to Interactive by finding the first period of 500ms where all of the following are true:
* There were no Long Tasks
* The FPS was always above 20 (if available)
* Page Busy was less than 10% (if the above aren't available)
Frame Rate
The c.f
equals 61 which according to the docs is the average frame rate over the duration base. However when I take the timeline data which is given in c.t.fps
I get a compressed value of "0*5*62"
, which when I decompress according to their algorithm I get [6, 6, 6, 6, 6, 2]
, which clearly does not average out to 61.
The frame rate duration c.f.d
is 524 ms which makes why I have that number of data points but I don't see how the average matches up with the timeline.
Bonus question: can someone provide insight into when the frame rate starts and stops being measured?
TTI
The TTI is even more confusing IMO. The value I'm getting from the beacon 2075 and the method used was lt
(or LongTask). However the other data points don't support that being the TTI value. The time to visually ready is much lower at 948, there are is no long task data in the beacon so presumably this was not a factor in calculating TTI.
The last thing left is frame rate which as mentioned above doesn't seem to grok for me. It's not clear to me when (or if ever) the frame rate met those requirements
Was able to to figure this one out on my own eventually by picking through the boomerang code...
The array of [6, 6, 6, 6, 6, 2]
is more like frames per 100 ms than fps. The TTI is really calculated on this block.
if (idleIntervals >= TIME_TO_INTERACTIVE_IDLE_INTERVALS) {
tti = startTime + ((j - TIME_TO_INTERACTIVE_IDLE_INTERVALS) * COLLECTION_INTERVAL);
// ensure we don't set TTI before TTVR
tti = Math.max(tti, visuallyReady);
break;
}
What it's really saying there is that the number of consecutive idleIntervals
needs to be >= 5 (TIME_TO_INTERACTIVE_IDLE_INTERVALS
).
In my case above we had no long task data and time to visually ready happened before tti so that left us with the frame rates per second. As mentioned above I was interpreting those rates incorrectly
When it's using fps to determine if an interval was idle it using the following code block
if (data.fps && (!data.fps[j] || data.fps[j] < TIME_TO_INTERACTIVE_MIN_FPS_PER_INTERVAL)) {
// No FPS or less than 20 FPS during this interval
idleIntervals = 0;
continue;
}
TIME_TO_INTERACTIVE_MIN_FPS_PER_INTERVAL
is actually 2
, is calculated on this line
/**
* For Time to Interactive, minimum FPS per COLLECTION_INTERVAL.
*/
var TIME_TO_INTERACTIVE_MIN_FPS_PER_INTERVAL =
TIME_TO_INTERACTIVE_MIN_FPS / (1000 / COLLECTION_INTERVAL);
So frame rate per second is the limiting factor in tti value. The first 5 frame rate values measured were considered "good" for tti. But the reason it's still so much higher than the ttvr is because the frame rate didn't start being measured till later.
The time when when frame rate started being measured is given by the beacon value c.f.s
(a base36 encoded epoch time). The time when anything being measured by boomerang is given by c.e
. If you take the difference of these two in by beacon example in the wiki, you get the tti value being returned by boomerang