How to get percentage_smooth using a prerecorded timeline json file

4 views
Skip to first unread message

Srinivas Kowtal

unread,
Apr 27, 2015, 11:31:29 AM4/27/15
to tele...@chromium.org
Hello,

I have an uncommon question. So please bear with me.

I am interested in calculating the percentage_smooth of say a website like www.ebay.com before and after some modifications. The way run_benchmark works now is that it launches ebay, scrolls, and calculates smoothness. I wanted modify the website before the scroll begins. I tried putting break point in the smoothness_controller.py and in smoothness.py {one in telemetry\...\metric} and once it was hit modified the HTML of ebay {by opening DevTools} and restarted the benchmark. However, after restarting telemetry crashes indicating DevTools has crashed. Since I didn't know how to fix this crash or the timeout that results in telemetry due to the time it takes to edit the HTML file, I wanted to see if I can just extract the smoothness calculation code from rendering_stats.py and feed it the timeline json data directly {which would have been saved after running ebay independently without using telemetry}. However, the chain of data structures involved convinced me that I need to ask for help on this group. 

So my question is, how can I use the json file saved from timeline window and calculate the percentage_smooth value {it should match the calculation from timeline}? 

Regards
Srini

Dave Tu

unread,
Apr 27, 2015, 1:13:51 PM4/27/15
to Srinivas Kowtal, telemetry
Hi,

The metric computation is very sensitive to timing differences and I don't recommend trying to pull the code out and running it without Telemetry. Do you have another way to modify the HTML? Ideally you'd be able to use record_wpr to record two versions of the website - with and without the HTML changes. If you need to modify the website at runtime, you could try executing JavaScript inside the benchmark after page load to modify it.

Dave
Reply all
Reply to author
Forward
0 new messages