@salesforce/require-analytics
TypeScript icon, indicating that this package has built-in type declarations

0.9.21 • Public • Published

Node require analytics

What is this?

A simple library for capturing CommonJS require analytics in Node.js. This is useful for visualizing runtime application dependencies and the times it takes to load them.

How do I use it?

As early as possible in your application, require and start the module analytics gathering like so:

const analytics = require('../dist/util/modules').start();

Then, at the end of your application, you can dump the results to stderr:

analytics.dump();

You can also process the results manually if you prefer, using analytics.report().

By default, no analytics are actually gathered unless you either run the app with the envar REQUIRE_ANALYTICS=true set, or you pass true to start (which allows you to determine your method of enabling or disabling require analytics collection).

Readme

Keywords

none

Package Sidebar

Install

npm i @salesforce/require-analytics

Weekly Downloads

8,895

Version

0.9.21

License

BSD-3-Clause

Unpacked Size

13.7 kB

Total Files

5

Last publish

Collaborators

  • lwc-admin
  • dme722
  • nolanlawson
  • ire-npm-team-user
  • jburnie
  • abirchfieldsfdc
  • dlouvton
  • mobify
  • jmsjtu
  • jasonschroeder-sfdc
  • packagellama
  • maward
  • danielshox
  • duane.chew
  • dferro
  • jcourtner
  • jye-sf
  • adirasanam
  • hkii
  • iamaziz
  • dbreese-salesforce
  • ashokrudraraju
  • dhersam
  • demianbrecht
  • mbettio
  • damilareolowoniyi
  • mmadialagan
  • mjrust
  • salesforce-releases
  • kevinv11n
  • byao
  • pmdartus
  • ekashida
  • ravi.jayaramappa
  • apapko
  • jleen-sfdc
  • jqian
  • cwallsf
  • dhagberg-sf
  • khawkins
  • amphro
  • jodarove
  • sfdctaka
  • fernomac
  • jimjag
  • ivarley
  • jbartolotta-sfdc