# event-loop-stats

> Exposes stats about the libuv default loop

Latest version **1.4.1** (published 2022-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install event-loop-stats
pnpm add event-loop-stats
yarn add event-loop-stats
bun add event-loop-stats
```

## 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.4.1 |
| Published | 2022-01-21 |
| First published | 2015-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 36 |
| Author | Ben Blackmore |
| Maintainers | bripkens, basti1302 |
| Keywords | libuv, stats, monitoring, loop |

## Links

- npm: https://www.npmjs.com/package/event-loop-stats
- Repository: https://github.com/bripkens/event-loop-stats
- Homepage: https://github.com/bripkens/event-loop-stats#readme
- Issues: https://github.com/bripkens/event-loop-stats/issues
- npm.io page: https://npm.io/package/event-loop-stats

## Dependencies (1)

- [nan](https://npm.io/package/nan.md) ^2.14.0

## Recent versions

- 1.4.1 (latest) — 2022-01-21
- 1.4.0 — 2022-01-20
- 1.3.0 — 2020-04-22
- 1.2.0 — 2019-06-06
- 1.1.0 — 2018-08-10
- 1.0.0 — 2015-10-11

## README

<h1 align="center">event-loop-stats</h1>
<p align="center">Exposes stats about the libuv default loop</p>

[![Build Status](https://travis-ci.org/bripkens/event-loop-stats.svg?branch=master)](https://travis-ci.org/bripkens/event-loop-stats)

## Installation

```
npm install --save event-loop-stats
```

## Usage
```javascript
var eventLoopStats = require('event-loop-stats');
console.log('Stats', eventLoopStats.sense());
```

This will print the following information:

```
Stats {
  max: 5,
  min: 0,
  sum: 10,
  num: 5
}
```

## Property insights
 - `max`: Maximum number of milliseconds spent in a single loop since last `sense call`.
 - `min`: Minimum number of milliseconds spent in a single loop since last `sense call`.
 - `sum`: Total number of milliseconds spent in the loop since last `sense call`.
 - `num`: Total number of loops since last `sense call`.

## Node version compatibility
`event-loop-stats` depends on C++ extensions which are compiled when the `event-loop-stats` module is installed. Compatibility information can be inspected via the [Travis-CI build jobs](https://travis-ci.org/bripkens/event-loop-stats).

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