This class provides a simple info box that will help you monitor your code performance.
--enable-precise-memory-info)Forked from mrdoob’s stats.js

npm install fps.ts
import Stats from 'fps.ts';
const stats = new Stats();
stats.showPanel(1); // 0: fps, 1: ms, 2: mb, 3+: custom
document.body.appendChild(stats.dom);
function animate() {
stats.begin();
// monitored code goes here
stats.end();
requestAnimationFrame(animate ;
}
requestAnimationFrame(animate);
You can add this code to any page using the following bookmarklet:
javascript:(function(){const script=document.createElement('script');script.onload=function(){const stats=new Stats();document.body.appendChild(stats.dom);requestAnimationFrame(function loop(){stats.update();requestAnimationFrame(loop)});};script.src='https://aaronbeall.github.io/fps.ts/build/fps.min.js';document.head.appendChild(script);})()