benny-ascii-chart-reporter
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

benny-ascii-chart-reporter

ascii chart reporter for benny using chartscii

🔧 Install · 🧩 Example · 📜 API docs · 🔥 Releases · 💪🏼 Contribute · 🍻 Credits · 🖐️ Help


Install

$ npm i benny-ascii-chart-reporter

Example

import { suite, add, cycle, complete } from 'benny'
import { asciiChartReporter, Options } from 'benny-ascii-chart-reporter'

suite(
  __filename,

  add('Reduce two elements', () => {
    ;[1, 2].reduce((a, b) => a + b)
  }),

  add('Reduce five elements', () => {
    ;[1, 2, 3, 4, 5].reduce((a, b) => a + b)
  }),

  cycle(),

  // just pass it to complete()
  complete(
    asciiChartReporter(<Options>{
      theme: 'beach'
    })
  ),

  // complete() can be called again
  // for the default report output
  complete()
)

Output:

API

Table of Contents

asciiChartReporter

src/index.ts:14-43

Create a benny ascii chart reporter.

Parameters

  • options Options Chartscii options (optional, default {})

Returns CompleteFn The reporter function that can be passed to complete().

summary

src/index.ts:21-43

The ascii chart reporter.

Parameters

  • summary Summary The summary passed in the suite's complete() callback.

Credits

  • benny - a dead simple benchmarking framework
  • chartscii - create beautiful ascii charts

Contribute

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2021 stagas

Package Sidebar

Install

npm i benny-ascii-chart-reporter

Weekly Downloads

8

Version

1.0.1

License

MIT

Unpacked Size

9.78 kB

Total Files

9

Last publish

Collaborators

  • stagas