# perf-test-helper

> A tiny module to help test the performance of functions. It uses `perf_hooks` under the hood.

Latest version **0.0.1** (published 2021-06-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install perf-test-helper
pnpm add perf-test-helper
yarn add perf-test-helper
bun add perf-test-helper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-06-16 |
| First published | 2021-06-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nkhil |

## Links

- npm: https://www.npmjs.com/package/perf-test-helper
- npm.io page: https://npm.io/package/perf-test-helper

## Recent versions

- 0.0.1 (latest) — 2021-06-16

## README

# Performance test helper

A tiny module to help test the performance of functions. It uses `perf_hooks` under the hood.

## Usage

```javascript
const perfTestHelper = require('perf-test-helper')

function functionToTest(numbers) {
  return numbers.reduce((acc, val) => acc + val, 0)
}

const averageTime = perfTestHelper({
  iterations: 100,
  functionUnderTest: functionToTest,
  parameters: [
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  ]
}) 
// 0.115 (result is in milliseconds)

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