有谁知道IE是否有相当于Chrome的window.peformance.memory
财产?
我试图找到一种方法来分析我的应用程序中的IE的内存性能。
使用Chrome浏览器运行我的js脚本没问题,因为Chrome已经为memory
添加了专有的window.performance
属性(有关详细信息,请参阅window.performance.memory)。
我在Chrome中的方式是这样的:
browser.driver.executeScript(function () {
return window.performance.memory; // this is the problem, IE has no memory property
}).then(function (result) {
logResults(result.jsHeapSizeLimit);
logResults(result.usedJSHeapSize);
logResults(result.totalJSHeapSize);
}
});
Internet Explorer,使用navigation.performance进行其他类型的测量。更多参考速度。
https://developer.mozilla.org/en-US/docs/Web/API/Performance
例如:window.performance.now()
在此页面上,您可以看到可以使用Internet Explorer或其他浏览器获取的所有数据。您必须在网址中输入Internet Explorer,才能使用浏览器查看数据