如何清除chrome性能条目或绕过其数量限制?

Gar*_* BN 7 javascript performance firefox google-chrome

我使用谷歌浏览器分析一些使用Javascript动态加载脚本和其他资源的网页的性能.

我使用了performance.getEntries()方法,但我注意到Chrome只记录了前150个资源.我找不到任何方法来获取更多条目,或删除旧条目.

我看到性能对象有clearMeasures或clearMarks等方法,但我没有用它们来删除条目.

所以我的问题是:

  1. 是否有可能获得超过150个性能条目?如果可能 - 怎么样?
  2. 是否可以清除条目(例如,在读取某些条目的数据后,将其删除)?如果可能 - 怎么样?

小智 4

你可以试试

performance.webkitSetResourceTimingBufferSize(your_number);  
Run Code Online (Sandbox Code Playgroud)

不管怎样,在 Firefox 中,您可以使用

performance.setResourceTimingBufferSize(your_number);
Run Code Online (Sandbox Code Playgroud)

有关浏览器及其支持的完整列表window.performance,请参阅http://compatibility.shwups-cms.ch/en/home?&property=performance