Suspect the correctness of start render time

I use my private wpt instance and notice that my page’s start render time increase from 1.0s to 4s using chrome after agent machine reboot, but using eye it should not be that long period.

So my question is: how can I check the start-render time calculation process to make sure if there’s something wrong with some step by reading the code?

Thanks!

Here’s the code that records the start render: https://github.com/WPO-Foundation/webpagetest/blob/master/agent/wpthook/results.cc#L273

I don’t think reading the code is going to get you what you want though. The code walks through the captured video frames and records the first change. If you capture video and go look at the filmstrip it should show you the agent’s view of things.

Be great if you could post a link to the site your testing too.

The way I get finer grain info, is to run inotifywait reporting times + file accesses on the site I’m testing. This works best with a test site, where you are the only visitor.

Using something like this command gives extremely fine grain info…

inotifywait -e open -mr --timefmt ‘%Y-%m-%d-%T’ --format ‘%w%f %T %e’ --exclude ‘.(bak|sw[xp])$’

Then you can look at all the file opens in the “time to first byte window” + consider which files may be involved.

If you have to go deeper you can use XDebug function traces describe here http://xdebug.org/docs/execution_trace where show_mem_delta allows pinpointing memory ballooning + collect_return allows pinpointing which call (out of multiple calls) to the same routine might be a performance hog.

There’s no WPT mechanism for finer granularity + inotifywait + XDebug can easily show this info accessing server side data.

Another tool is XHprof, which shows a callgraph view so you can identify where most time is spent by routine in a graphical arrangement you can look at + in a few seconds visualize TFB related problems.