# karma-time-stats-reporter

> Karma Reporter for test time stats

Latest version **0.1.0** (published 2019-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-time-stats-reporter
pnpm add karma-time-stats-reporter
yarn add karma-time-stats-reporter
bun add karma-time-stats-reporter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-02-24 |
| First published | 2019-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 73 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Christian Catalan |
| Maintainers | crcatala |
| Keywords | karma-plugin, karma-reporter |

## Links

- npm: https://www.npmjs.com/package/karma-time-stats-reporter
- Repository: https://github.com/crcatala/karma-time-stats-reporter
- Homepage: https://github.com/crcatala/karma-time-stats-reporter#readme
- Issues: https://github.com/crcatala/karma-time-stats-reporter/issues
- npm.io page: https://npm.io/package/karma-time-stats-reporter

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [columnify](https://npm.io/package/columnify.md) ^1.5.4

## Recent versions

- 0.1.0 (latest) — 2019-02-24
- 0.0.5 — 2019-02-19
- 0.0.4 — 2019-02-18
- 0.0.3 — 2019-02-18
- 0.0.2 — 2019-02-18
- 0.0.1 — 2019-02-18

## README

# karma-time-stats-reporter

[![CircleCI](https://circleci.com/gh/crcatala/karma-time-stats-reporter.svg?style=svg)](https://circleci.com/gh/crcatala/karma-time-stats-reporter)

## Description

A Karma Reporter for test times stats. See histogram of time your tests take, and identify slow tests.

<img src="screenshots/screenshot.jpg" width="500"/>

## Use In Project

Install package:

`npm install karma-time-stats-reporter --save-dev`

in your karma config:

```js
module.exports = function(config) {
  // other keys ommited for brevity
  config.set({
    reporters: ["dots", "time-stats"],
    // This is config options for the reporter. Listed here are the defaults if you don't provide this any options
    timeStatsReporter: {
      reportTimeStats: true,           // Print Time Stats (histogram)
      
      binSize: 100,                    // Bin size for histogram (in milliseconds)

      slowThreshold: 500,              // The threshold for what is considered a slow test (in milliseconds).
                                       // This is also the max value for last bin histogram 
                                       // Note that this will automatically be rounded up to be evenly divisible by binSize

      reportSlowestTests: true,        // Print top slowest tests

      showSlowTestRankNumber: false    // Displays rank number next to slow tests, e.g. `1) Slow Test`

      longestTestsCount: 5,            // Number of top slowest tests to list
                                       // Set to `Infinity` to show all slow tests. Useful in combination with `reportOnlyBeyondThreshold` as `true`

      reportOnlyBeyondThreshold: false // Only report tests that are slower than threshold

    }
  });
};
```

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