1.2.7 • Published 7 years ago

lstats.js v1.2.7

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago