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

node-performance

v0.1.3

Published

A HTTP performance analysis tool.

Downloads

7

Readme

Node HTTP Performance Analysis Tool

Dependencies NPM version Known Vulnerabilities

Installation

git clone https://github.com/mrodrig/node-performance.git

Usage

cd ./node-performance/
npm install
cd ./lib/
  • Options

    • Open ./options.json and make the necessary changes.
    • Currently, this HTTP performance testing script allows for the following options to be set:
      • URL - The web site address that you wish to test. Be sure to include an appropriate protocol (ie. http://, https://, etc)
      • HTTP_METHOD - The HTTP Method that will be used to make this call (ie. GET, POST, DELETE, etc)
      • REQ_BODY - This is a key: value JSON document that will allow you to pass data in the body of the requests.
      • REQ_HEADERS - This is a key: value JSON document that will allow you to pass data in the headers of the requests.
      • NUM_PASSES - The number of times that you wish to run the multiple requests. Each pass is run in series and will asynchronously make NUM_REQUESTS requests to the given web address.
      • NUM_REQUESTS - The number of HTTP requests to make asynchronously in each pass.
  • Once the options have been configured, run:

node perfTest.js

Sample Output

Starting the performance test...

Performing singleRequest for baseline...
Finished singleRequest.
  Request took: 148 ms.


Starting pass #0
  Response Times (ms): 144, 155, 145, 144, 134, 223, 220, 248, 250, 249, 307, 319, 352, 352, 347
  Response Calculations:  { sum: 3589, average: 239.26666666666668 }


Starting pass #1
  Response Times (ms): 141, 150, 127, 128, 129, 217, 215, 228, 237, 247, 287, 302, 322, 334, 342
  Response Calculations:  { sum: 3406, average: 227.06666666666666 }


Starting pass #2
  Response Times (ms): 131, 127, 126, 161, 159, 217, 455, 228, 245, 255, 304, 319, 318, 332, 335
  Response Calculations:  { sum: 3712, average: 247.46666666666667 }


Starting pass #3
  Response Times (ms): 150, 147, 157, 143, 126, 224, 249, 243, 259, 242, 312, 343, 340, 351, 352
  Response Calculations:  { sum: 3638, average: 242.53333333333333 }


Starting pass #4
  Response Times (ms): 148, 158, 156, 158, 169, 222, 255, 252, 252, 254, 331, 350, 350, 351, 351
  Response Calculations:  { sum: 3757, average: 250.46666666666667 }


Average Response Time: 241.43333333333334 ms


All passes have been completed.
Finished the performance test.

Features

  • Provides a baseline for a single request
  • Allows you to see how your app/web service/endpoint scales with multiple requests asynchronously
  • Provides summary information
  • Passes applicable information back to init method's callback

TODO

  • Convert to node module to allow for easier testing
  • Pass more applicable data back to the user