# @jsenv/perf-impact

> Integrates performance impact to your pull requests on GitHub

Latest version **0.8.1** (published 2021-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsenv/perf-impact
pnpm add @jsenv/perf-impact
yarn add @jsenv/perf-impact
bun add @jsenv/perf-impact
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.1 |
| Published | 2021-07-25 |
| First published | 2021-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=14.17.0 |
| Dependencies | 6 |
| Unpacked size | 44.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dmail |
| Maintainers | jsenv-admin, dmail |

## Links

- npm: https://www.npmjs.com/package/@jsenv/perf-impact
- Repository: https://github.com/jsenv/jsenv-perf-impact
- Homepage: https://github.com/jsenv/jsenv-perf-impact#readme
- Issues: https://github.com/jsenv/jsenv-perf-impact/issues
- npm.io page: https://npm.io/package/@jsenv/perf-impact

## Dependencies (6)

- [bytes](https://npm.io/package/bytes.md) 3.1.0
- [@jsenv/util](https://npm.io/package/@jsenv/util.md) 4.1.1
- [@jsenv/logger](https://npm.io/package/@jsenv/logger.md) 4.0.1
- [@jsenv/server](https://npm.io/package/@jsenv/server.md) 6.1.0
- [humanize-duration](https://npm.io/package/humanize-duration.md) 3.27.0
- [@jsenv/cancellation](https://npm.io/package/@jsenv/cancellation.md) 2.0.4

## Recent versions

- 0.8.1 (latest) — 2021-07-25
- 0.8.0 — 2021-07-24
- 0.7.0 — 2021-07-24
- 0.6.0 — 2021-07-24
- 0.5.2 — 2021-07-24
- 0.5.1 — 2021-07-24
- 0.5.0 — 2021-07-24
- 0.4.4 — 2021-07-24
- 0.4.1 — 2021-07-24
- 0.4.0 — 2021-07-24
- 0.3.0 — 2021-07-24
- 0.2.0 — 2021-07-24
- 0.1.2 — 2021-07-23
- 0.1.1 — 2021-07-23
- 0.1.0 — 2021-07-23
- … 3 more at https://npm.io/package/@jsenv/perf-impact/versions

## README

# Perf impact

Integrates performance impact to your pull requests on GitHub.

[![npm package](https://img.shields.io/npm/v/@jsenv/perf-impact.svg?logo=npm&label=package)](https://www.npmjs.com/package/@jsenv/perf-impact)
[![github main](https://github.com/jsenv/jsenv-perf-impact/workflows/main/badge.svg)](https://github.com/jsenv/jsenv-perf-impact/actions?workflow=main)
[![codecov coverage](https://codecov.io/gh/jsenv/jsenv-perf-impact/branch/main/graph/badge.svg)](https://codecov.io/gh/jsenv/jsenv-perf-impact)

# Presentation

This package is under construction.

This tool makes it possible to estimate performance impacts before making code available to your users: right from GitHub pull requests.

However the metrics cannnot be trusted blindly due to [performance variability](#Performance-variability). For this reason this tool can be used to catch big performance impacts but not for the small ones. See [how to catch small performance impacts?](#How-to-catch-small-performance-impacts)

# Performance variability

Performance metrics will change due to inherent variability, **even if there hasn't been a code change**. It can be mitigated by measuring performance multiple times. But you should always keep in mind this variability before drawing conclusions about a performance-impacting change.

With time you will learn how your performance usually vary. This will make you capable to recognize unusual variation.

# How to catch small performance impacts?

Catching small to very small performance impacts with confidence requires a LOT of repetition and time. Both strategies means you will have to wait before knowing the real performance impact.

_How to catch small impacts with a lot of repetition?_

- Let your code be used a lot of times in a lot of scenarios and see the results. This could be scripts, real users or both.

- Push your performance metrics in a tool like Kibana or DataDog and check the tendency of your performance metrics.

In the end I would recommend the following approach:

1. Setup a script measuring performance metrics
2. Setup `@jsenv/perf-impact` to see performance impact into GitHub pull requests
3. Setup a script uloading performance metric to a dashboard.
4. Inside a pull request, when performance impact looks big: investigate.
5. If performance impact looks small: ignore.
6. Finally, once per week/month, watch the dashboard to check performance metrics tendency: are they stable, increasing or decreasing?

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