# js-meter

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

Latest version **1.1.4** (published 2018-10-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install js-meter
pnpm add js-meter
yarn add js-meter
bun add js-meter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2018-10-18 |
| First published | 2017-08-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | wahengchang@gmail.com |
| Maintainers | wahengchang |
| Keywords | javascript, test, performance, cpu, ram, time, spend, testing, speed |

## Links

- npm: https://www.npmjs.com/package/js-meter
- Repository: https://github.com/wahengchang/js-meter
- Homepage: https://github.com/wahengchang/js-meter#readme
- Issues: https://github.com/wahengchang/js-meter/issues
- npm.io page: https://npm.io/package/js-meter

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2018-10-18
- 1.1.3 — 2018-10-17
- 1.1.2 — 2017-08-31
- 1.1.1 — 2017-08-31
- 1.1.0 — 2017-08-29
- 1.0.0 — 2017-08-11

## README

#js-meter
it is an tool of measuring performance of time, CPU, RAM and heap of javascript code

[![NPM](https://nodei.co/npm/js-meter.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/js-meter)


## Install

```
$ npm install --save js-meter
```


## Usage
Initializing js-meter 
```js
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](http://vjpr.mit-license.org)

---
_Source: https://npm.io/package/js-meter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
