browser-perf icon indicating copy to clipboard operation
browser-perf copied to clipboard

Memory metrics for Chrome using window.performance.memory

Open sebadoom opened this issue 9 years ago • 6 comments

As title says. Uses setInterval (is this OK?).

sebadoom avatar Jan 07 '16 21:01 sebadoom

@sebadoom Thanks a lot of the pull request. I had been exploring ways to get memory profile and I think this is perfect. Just a couple of comments on the code

axemclion avatar Jan 08 '16 06:01 axemclion

Did you notice a lot of difference in other data when this was enabled, as opposed to having stopped this metric ? I was wondering if this code would add noise to the data that we finally collect.

axemclion avatar Jan 08 '16 06:01 axemclion

TBH I haven't compared these results to the previous ones. Fortunately they are readily available in the benchmarks repo (https://github.com/auth0/blog-dombench). I will take a look when I have some time (probably tomorrow) and post my findings here.

sebadoom avatar Jan 09 '16 00:01 sebadoom

@axemclion have you had a chance to review my comments above?

sebadoom avatar Jan 11 '16 15:01 sebadoom

@sebadoom Sorry for the delay. I am currently experimenting to see if there is another way to get the same information that you get using window.performance.memory. I noticed that the timeline that we collect for metrics like frames_per_sec or paint seems to have information like jsHeapSize, etc. Do you think we could instead try to get the information from that ?

Uncommenting this line when running the tests gives you a file called perflogProbe.json, which is a large file that is the representation of the timeline. Do you think we could use that ? The data may also be more accurate, and similar to what the Chrome devtools shows.

axemclion avatar Jan 11 '16 20:01 axemclion

Any progress on this?

Also, it looks like we would need to add --enable-precise-memory-info to get more granular memory information.

http://peter.sh/experiments/chromium-command-line-switches/#enable-precise-memory-info

fc avatar Dec 20 '16 18:12 fc