如何清除镀铬性能条目或绕过其数量限制? [英] How to clear chrome performance entries or bypass the limit on their number?
问题描述
我使用Google Chrome浏览器来分析某些使用Javascript动态加载脚本和其他资源的网页的性能.
I use Google Chrome to analyze the performance of some webpage that using Javascript dynamically load scripts and other resources.
我使用performance.getEntries()方法,但是我注意到Chrome仅记录前150个资源.我找不到任何获取更多条目或删除旧条目的方法.
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.
我看到性能对象具有诸如clearMeasures或clearMarks之类的方法,但是我无法使用它们来删除条目.
I saw that the performance object has methods like clearMeasures or clearMarks, but I failed to use them for removing entries.
所以我的问题是:
- 是否有可能获得150多个性能条目?如果可能的话-怎么办?
- 是否可以清除条目(例如,在读取某些条目的数据后将其删除)?如果可能的话-怎么办?
推荐答案
您可以尝试
performance.webkitSetResourceTimingBufferSize(your_number);
关于它的价值,在Firefox中,您可以使用
For what it's worth, in Firefox, you can use
performance.setResourceTimingBufferSize(your_number);
有关浏览器及其对window.performance
的支持的完整列表,请参见 http://compatibility.shwups-cms.ch/en/home?&property=performance
For full list of browsers and their support for window.performance
, see http://compatibility.shwups-cms.ch/en/home?&property=performance
这篇关于如何清除镀铬性能条目或绕过其数量限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!