Skip to content

it is an tool of measuring performance of time, CPU, RAM and heap of javascript code

Notifications You must be signed in to change notification settings

wahengchang/js-meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-meter

It is an tool of measuring performance of time, CPU, RAM and heap of javascript code

NPM

Install

$ npm install --save js-meter

Usage

Initializing js-meter

const jm = require('js-meter')

const isPrint = true
const isKb = true       // or Mb
const m = new jm({isPrint, isKb})

for(var i=0; i<10000; i++){
    Math.random()
}

const meter = m.stop()
// RAM        :  1080 kb
// HeapTotal  :  1024 kb
// HeapUsed   :  -7.2265625 kb
// External   :  0 kb
// CPU        :  3.344 ms
// Spend time :  1004 ms

License

MIT

About

it is an tool of measuring performance of time, CPU, RAM and heap of javascript code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published