简体   繁体   English

Internet Explorer等同于window.performance.memory?

[英]Internet Explorer equivalent to window.performance.memory?

Does anyone know if IE has an equivalent to Chrome's window.peformance.memory property? 有谁知道IE是否具有Chrome的window.peformance.memory属性?

I am trying to find a way to analyse IE's memory performance in my application. 我试图找到一种方法来分析我的应用程序中的IE的内存性能。

Running my js script using a Chrome browser is no problem, because Chrome has added a proprietary memory property to window.performance (see window.performance.memory for more info). 使用Chrome浏览器运行我的js脚本没有问题,因为Chrome已向window.performance添加了专有memory属性(有关详细信息,请参阅window.performance.memory )。

The way I do it in Chrome is like this: 我在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, use navigation.performance to make other types of measurements. Internet Explorer,使用navigation.performance进行其他类型的测量。 More reference to speed. 更多参考速度。

https://developer.mozilla.org/en-US/docs/Web/API/Performance https://developer.mozilla.org/en-US/docs/Web/API/Performance

For example: window.performance.now() 例如:window.performance.now()

On this page you can see all the data that can be obtained with internet explorer or other browsers. 在此页面上,您可以看到可以使用Internet Explorer或其他浏览器获取的所有数据。 You must enter with the internet explorer in the url, to see the data with the browser 您必须在网址中输入Internet Explorer,才能使用浏览器查看数据

https://browserleaks.com/javascript https://browserleaks.com/javascript

Other option is using: CTRL+Shift+U keys 其他选项使用:CTRL + Shift + U键 在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM