Advanced stats library to monitor, frame time, memory and resource details.
Uses performance.now()
with Date.now()
fallback on older browsers.
Tested in Chrome, should also work in Firefox, IE & Opera.
Resource details not supported in Safari.
Installation
npm install perf-plus.js
API
var perf = new PerfPlus();
Make sure you call start
method after all the resources are loaded for accurate resource details.
perf.start();
The following data is available:
perf.currentFps
- current frame rateperf.averageFps
- average frame rateperf.minFps
- minimum frame rateperf.maxFps
- maximum frame rateperf.currentMs
- current time between frames in milli secondsperf.currentMem
- current memory usage (Chrome only)perf.resourceCount
- total resources loaded by the appperf.resourceLoadDuration
- loadDuration of all the resourcesperf.pageLoadTime
- dom load time
To destroy stats call
perf.destroy();
UI
Powered by dat.GUI
Bookmarklet
javascript:{ var script=document;scriptsrc='//cdn.rawgit.com/adireddy/perf-plus/53db290a194b91af93d1fb34d3d3b602fbfe74d3/dist/perf-plus.min.js';documenthead;script{windowperf = ;windowperfstart;}}
Licensing Information
This content is released under the MIT License.