Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear chrome performance entries or bypass the limit on their number?

I use Google Chrome to analyze the performance of some webpage that using Javascript dynamically load scripts and other resources.

I use the performance.getEntries() method, but I noticed that Chrome records only the first 150 resources. I could not find any way to get more entries, or to remove old entries.

I saw that the performance object has methods like clearMeasures or clearMarks, but I failed to use them for removing entries.

So my questions are:

  1. Is it possible to get more than 150 performance entries? If possible - how?
  2. Is it possible to clear the entries (for example, after reading the data of some entry, to remove it)? If possible - how?
like image 340
Gari BN Avatar asked Sep 28 '14 07:09

Gari BN


1 Answers

You can try

performance.webkitSetResourceTimingBufferSize(your_number);  

For what it's worth, in Firefox, you can use

performance.setResourceTimingBufferSize(your_number);

For full list of browsers and their support for window.performance, see http://compatibility.shwups-cms.ch/en/home?&property=performance

like image 174
Elena Averbakh Avatar answered Sep 29 '22 22:09

Elena Averbakh