0.1.7 • Published 8 years ago

perf-plus.js v0.1.7

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

perf plus logo

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 rate
  • perf.averageFps - average frame rate
  • perf.minFps - minimum frame rate
  • perf.maxFps - maximum frame rate
  • perf.currentMs - current time between frames in milli seconds
  • perf.currentMem - current memory usage (Chrome only)
  • perf.resourceCount - total resources loaded by the app
  • perf.resourceLoadDuration - loadDuration of all the resources
  • perf.pageLoadTime - dom load time

To destroy stats call

perf.destroy();

UI

Powered by dat.GUI

Bookmarklet

javascript:(function(){
    var script=document.createElement('script');script.src='//cdn.rawgit.com/adireddy/perf-plus/53db290a194b91af93d1fb34d3d3b602fbfe74d3/dist/perf-plus.min.js';document.head.appendChild(script);script.onload=function(){window.perf = new PerfPlus();window.perf.start();}
}())

Licensing Information

This content is released under the MIT License.

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago