# funcmeasure

> measure & compare execution times

Latest version **1.0.5** (published 2020-09-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install funcmeasure
pnpm add funcmeasure
yarn add funcmeasure
bun add funcmeasure
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-09-26 |
| First published | 2020-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 18.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kristóf-Attila Kovács |
| Maintainers | kkristof200 |

## Links

- npm: https://www.npmjs.com/package/funcmeasure
- Repository: https://github.com/kkristof200/js_funcmeasure
- Homepage: https://github.com/kkristof200/js_funcmeasure#readme
- Issues: https://github.com/kkristof200/js_funcmeasure/issues
- npm.io page: https://npm.io/package/funcmeasure

## Dependencies (2)

- [typescript](https://npm.io/package/typescript.md) ^4.0.2
- [@types/node](https://npm.io/package/@types/node.md) ^14.6.0

## Recent versions

- 1.0.5 (latest) — 2020-09-26
- 1.0.4 — 2020-08-25
- 1.0.3 — 2020-08-25
- 1.0.2 — 2020-08-25
- 1.0.1 — 2020-08-25
- 1.0.0 — 2020-08-25

## README

## Installation

```
npm install --save funcmeasure
```

## Usage

```typescript
import { measure } from 'funcmeasure';

function f1() { 1 + 1 }
function f2() {
    var i = 5

    for (let _ = 0; _ < 100; _ ++) {
        i = Math.pow(i, 10)
    }
}

let measurements = measure([f1, f2], 10000, true)
```

## Result

```
Tested 2 functions, ran 10000 times each.

--------------------------------------------------------------
| Function | Total Duration |   Avg Duration |         Score |
--------------------------------------------------------------
|       f1 |    0.000309193 |        3.09e-8 |       fastest |
|       f2 |    0.008580814 |       8.581e-7 | 27.75x slower |
--------------------------------------------------------------
```

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