# runtime-performance

> Measure the performance of your code.

Latest version **1.0.2** (published 2020-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install runtime-performance
pnpm add runtime-performance
yarn add runtime-performance
bun add runtime-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.0.2 |
| Published | 2020-07-30 |
| First published | 2020-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Victor Labuschagne |
| Maintainers | victorhlab |
| Keywords | Performance, measuring, execution, time, efficient, code |

## Links

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

## Recent versions

- 1.0.2 (latest) — 2020-07-30
- 1.0.1 — 2020-07-30
- 1.0.0 — 2020-07-30

## README

# What is this?

Measure the run time performance of your code. This is done by 
measuring the time at a starting point and at the end point.
The performance time is then calculated and returned for your usage.
Measurements are in milliseconds (ms).

# Installation 

`npm i runtime-performance --save`

# Usage 
Example 1
```
import {performanceStart, performanceEnd, performanceTime} from 'runtime-performance';

runtime = {start:0, end:0};
performanceStart(runtime);

#
# your code block to measure: delay(1000);
#

performanceTime = performanceEnd(runtime);
console.log("Execution time = " + performanceTime);

```

Example 2
```
import {performanceStart, performanceEnd, performanceTime} from 'runtime-performance';

runtime = {start:0, end:0};

performanceStart(runtime);

#
# your code block to measure: delay(1000);
#

performanceEnd(runtime);

console.log("Execution time = " + performanceTime(runtime));
```

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