This package has been deprecated

Author message:

This package is no longer maintained. Please, use @openreplay/tracker and @openreplay/tracker-profiler instead.

@asayerio/tracker-profiler

1.0.0 • Public • Published

Asayer Tracker profiler plugin

The profiler plugin allows you to measure function performance and capture the arguments and result for each function call.

Installation

npm i @asayerio/tracker-profiler --save

Usage

Initialize the @asayerio/tracker package as usual and load the plugin into it. Then decorate any function inside your code with the generated function.

import Tracker from '@asayerio/tracker';
import trackerProfiler from '@asayerio/tracker-profiler';

const tracker = new Tracker({
  projectID: PROJECT_ID,
});
tracker.start();

export const profiler = tracker.plugin(trackerProfiler());

const fn = profiler('call_name')(() => {
  // ...
}, thisArg); // thisArg is optional

Package Sidebar

Install

npm i @asayerio/tracker-profiler

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.5 kB

Total Files

5

Last publish

Collaborators

  • estradino