# js-performance

> A utility to measure js performance

Latest version **1.2.1** (published 2017-04-26) · MIT license · 0 weekly downloads

## Install

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

## 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.2.1 |
| Published | 2017-04-26 |
| First published | 2017-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | joezheng |
| Maintainers | joezheng |
| Keywords | performance |

## Links

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2017-04-26
- 1.2.0 — 2017-04-26
- 1.1.1 — 2017-04-02
- 1.1.0 — 2017-04-02
- 1.0.9 — 2017-02-27
- 1.0.8 — 2017-02-27
- 1.0.7 — 2017-02-27
- 1.0.6 — 2017-02-23
- 1.0.5 — 2017-02-22
- 1.0.4 — 2017-02-21
- 1.0.3 — 2017-02-21
- 1.0.2 — 2017-02-21
- 1.0.1 — 2017-02-21
- 1.0.0 — 2017-02-21

## README

# js-performance

A simple javascript utility to measure performance

## Reason
Using `console.time` and `console.timeEnd` is tedious and may introduce extra time by invoking console.

## Usage
- time to mark the start point
- timeEnd to mark the end point
- log to log all mark message together
- block to block js thread

``` javascript
import {time, timeEnd, log, block} from 'js-performance'

time('test')
block(5000)
timeEnd('test')

log() // test: 5000ms
```

- measureCRP to measure the CRP time including interactive, domContentLoaded and complete

``` javascript
import {measureCRP} from 'js-performance'

measureCRP() // log your CRP time
```

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