# promise-profiler

> Track promise & non-promise execution time

Latest version **0.1.2** (published 2017-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-profiler
pnpm add promise-profiler
yarn add promise-profiler
bun add promise-profiler
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2017-06-09 |
| First published | 2017-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chaowlert Chaisrichalermpol |
| Maintainers | chaowlert |
| Keywords | profiler, promise |

## Links

- npm: https://www.npmjs.com/package/promise-profiler
- Repository: https://github.com/chaowlert/promise-profiler
- Homepage: https://github.com/chaowlert/promise-profiler#readme
- Issues: https://github.com/chaowlert/promise-profiler/issues
- npm.io page: https://npm.io/package/promise-profiler

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2017-06-09
- 0.1.1 — 2017-06-09
- 0.1.0 — 2017-06-09

## README

# profile-profiler
Track promise & non-promise execution time

## Install

```
npm install profile-profiler --save
```

## Usage

### Patch function

```javascript
fn = profiler.patch(fn, 'name');    //name can be omit to use function name
```

### Patch object

```javascript
profiler.patch(obj, 'name');    //name can be omit to use class name
```

### Turn profiler on/off
```javascript
profiler.active = true; //or false for off
```

### Get report
```javascript
let result = profiler.report();
//[
//  { name: 'fnName', sum: 1000, min: 20, max: 150, avg: 100, count: 10 }    
//]
```

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