npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

load-perf

v0.2.0

Published

Check load performance of your module and its dependencies

Downloads

12,254

Readme

NPM version Build Status

load-perf

Idea

Main idea here is to measure the load(require) time for dependencies and devDependencies for your project or module. we also calculate the load(require) time of your module. This give an idea about how much time would it take for your module to be required by the consumer.

Key points:

  • Measure load performance of your module when its required
  • Measure load performance of your dependencies
  • Measure load performance of your devDependencies

How to use

Just install the module

npm install load-perf -g

Then just run the module on your project or module

load-perf

Options

  -h, --help                  Show help.
  -v, --version               Outputs the version number.
  -p, --package path::String  Package json file path. - default: ./package.json
  -d, --checkDevDependencies  Perf calculation for devDependencies. - default: false
  --no-checkDependencies      Perf calculation for dependencies. - default: true

NodeJs API

You can consume this module programmatically through the Node.js API also.

var loadPerf = require("load-perf");

var defaultOptions = {
    package: "./package.json",
    checkDevDependencies: false,
    checkDependencies: true
};

var performanceData = loadPerf(defaultOptions);

Even if the options are not supplied to the function, we will use the defaults.

Output Example

All times are in ms.

$ load-perf
Dependencies:
chalk                  :   21.332987
concat-stream          :   16.36361
debug                  :   13.844468
doctrine               :   10.851406
escape-string-regexp   :   1.946993
escope                 :   67.604855
espree                 :   17.298621
estraverse             :   3.452687
estraverse-fb          :   8.504899
glob                   :   18.858194
globals                :   3.553849
handlebars             :   62.334192
inquirer               :   101.852429
file-entry-cache       :   1.86819
is-my-json-valid       :   9.402158
is-resolvable          :   2.927087
js-yaml                :   47.601996
lodash.clonedeep       :   20.422166
lodash.merge           :   25.618057
lodash.omit            :   23.293907
minimatch              :   6.914903
mkdirp                 :   1.686758
object-assign          :   1.593661
optionator             :   27.581543
path-is-absolute       :   1.661102
path-is-inside         :   1.762264
shelljs                :   37.127746
strip-json-comments    :   1.587796
text-table             :   1.437153
to-double-quotes       :   1.988777
to-single-quotes       :   1.725977
user-home              :   1.437153
xml-escape             :   1.249491

Module load time: 278.161939