Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lstats.js

Visualizing and monitor your performance.

Inspired by stats.js and memory-stats.js.

mb fps ms

Why

  • Lite (vs pstats.js)
  • Support GC detection when monitor memory (vs stats.js)
  • Drawing fast (vs memory-stats.js)

Install

npm install lstats.js

Usage

let stats = new LStats(document.body, [
  'fps', 'ms', 'mem'
]);

function render() {
  stats.tick();
  requestAnimationFrame(render);
}

render();

NOTE: if you want to monitor memory, start Chrome with --enable-precise-memory-info. Otherwise the results from performance.memory are bucketed and less useful. if you are using Electron, start the BrowserWindow with the following code:

let win = new BrowserWindow({
  webPreferences: {
    blinkFeatures: 'PreciseMemoryInfo'
  }
});

License

MIT © 2017 Johnny Wu

About

Performance Monitor (Lite)

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages