English 中文(简体)
GPU/GPU/memory information
原标题:Get CPU/GPU/memory information

I need to get any information about the CPU/GPU/memory.The number of cores, memory value, memory and cpu usage... I found a way to do this for IE:How to Use JavaScript to Find Hardware Information

solutions for other browsers I do not know. Any idea how to do it? maybe webgl has access to information about your computer? or flash? or any other technology?

非常感谢

问题回答

该守则将印刷万国邮联的图象,其中将列出你能够拥有的该浏览器性能目标的所有信息(管理局没有标准,因此每个浏览器都有改动)。

<html>

<body>
  <canvas id="glcanvas" width="0" height="0"></canvas>
  <script>
    var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};

    document.write("<br>");
    for (var value in performance) {
      document.write(value + "<br>");
    }

    document.write("<br><br><br>");

    var canvas;
    canvas = document.getElementById("glcanvas");
    var gl = canvas.getContext("experimental-webgl");

    document.write(gl.getParameter(gl.RENDERER) + "<br>");
    document.write(gl.getParameter(gl.VENDOR) + "<br>");
    document.write(getUnmaskedInfo(gl).vendor + "<br>");
    document.write(getUnmaskedInfo(gl).renderer + "<br>");


    function getUnmaskedInfo(gl) {
      var unMaskedInfo = {
        renderer:   ,
        vendor:   
      };

      var dbgRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
      if (dbgRenderInfo != null) {
        unMaskedInfo.renderer = gl.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL);
        unMaskedInfo.vendor = gl.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL);
      }

      return unMaskedInfo;
    }
  </script>
</body>

Chrome:

onresourcetimingbufferfull
onwebkitresourcetimingbufferfull
timing
navigation
memory
now
getEntries
getEntriesByType
getEntriesByName
clearResourceTimings
setResourceTimingBufferSize
webkitClearResourceTimings
webkitSetResourceTimingBufferSize
mark
clearMarks
measure
clearMeasures
addEventListener
removeEventListener
dispatchEvent



WebKit WebGL
WebKit
NVIDIA Corporation
NVIDIA GeForce GTX 775M OpenGL Engine

Firfox的输出:

now
getEntries
getEntriesByType
getEntriesByName
clearResourceTimings
setResourceTimingBufferSize
mark
clearMarks
measure
clearMeasures
toJSON
timing
navigation
onresourcetimingbufferfull



Mozilla
Mozilla

引文:

navigation
timing
now



WebKit WebGL
WebKit
NVIDIA Corporation
NVIDIA GeForce GTX 775M OpenGL Engine

目前 • 提供动力支持,利用:

navigator.hardwareConcurrency

http://basvdijk.com/get-the- number-of-cpu-cores-in-javascript/“rel=“noreferer”>worked,供我 in Canary 37。

CPU速度估算,按时间计算,计算可变数数百万倍:

const runs = 150000000;
const start = performance.now(); // in ms, usually with 100us resolution
for (let i = runs; i>0; i--) {}
const end = performance.now();
const ms = end - start;
const cyclesPerRun = 2;
const speed = (runs * cyclesPerRun) / ms / 1000000;
console.log(`Time: ${Math.round(ms)/1000}s, estimated speed: ${Math.round(speed*10)/10} GHz`);

。 更有指示,它们可能更快地增加频率等。 视您的工作情况而定,你可能最好使用<条码>runs /ms作为通用的“CPUpac”参数,而不是试图用<条码>估算GHz的锁速。

您也可通过在万国邮联上操作上述代码,估算<代码>的周期代码>。

const knownSpeed = 3.2; // GHz
const estimatedCyclesPerRun = knownSpeed / (runs/ms/1000000);
console.log("cyclesPerRun = " + estimatedCyclesPerRun);

这一基准还取决于用户开放的浏览器数量,或者如果其他一些方案(如视频游戏)已经使用计算机资源等。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签