fn-profiler

0.0.2 • Public • Published

Overview and motivation

A super simple wrapper to let you understand how many times a function is being called during an event loop tick and how much time it took to run.

Usage

// your code before
const myFn = () => {};

// your code to run the profiler
const profile = require('fn-profiler');
const myFn = profile(() => {});

// optionally
const myFn = profile(() => {}, 'Human Friendly Name', {maxConsolesPerTick: 1});

Planned improvements

  • Configurability & Output.
  • Logged output likely to change, don't count on it's format

Readme

Keywords

none

Package Sidebar

Install

npm i fn-profiler

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • metalsheep