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

@negev/cli

v0.0.1-alpha.5

Published

Run loadtests against your GraphQL backend

Downloads

5

Readme

@negev/cli

npm version Build Status

Benchmark your GraphQL servers with ease.

Installation

npm install -g @negev/cli

Demo

Why

Common loadtesting tools expect you to read documentation, write configuration files or hack together multline bash scripts. negev doesn't. Just run the negev command and answer some questions. (Don't worry, you still can write bash scripts - scroll down further for an example).

Additionally, most of them weren't written with GraphQL in mind, while this one exclusively serves the purpose of loadtesting GraphQL servers, for example:

  • Proper error detection: GraphQL queries that run into errors will commonly still have a 200 response, with the distinction that their body contains the errors field. Since most tools written for plain REST servers simply look at the HTTP statuscode of each response, they wouldn't even detect that something went wrong.
  • Schema validation: If you're querying something that isn't in your schema, negev won't even start loadtesting, saving you valuable time.

Usage

$ negev --help

Benchmark your GraphQL servers with ease.

USAGE
  $ negev

OPTIONS
  -H, --headers=headers                    request header. can be set multiple times. example: -H="Content-Type: application/json"
  -c, --concurrencyLimit=concurrencyLimit  the limit of concurrent requests
  -d, --duration=duration                  the total duration of the loadtest
  -e, --endpoint=endpoint                  the endpoint to test
  -h, --help                               show CLI help
  -n, --numberRequests=numberRequests      the number of requests to send
  -q, --query=query                        the query to use
  -r, --rateLimit=rateLimit                the limit of requests per second
  -v, --version                            show CLI version

EXAMPLES
  $ negev    # Will run the command in prompt-mode
  $ negev -e="http://localhost:4000" -q="{ books { author } }"   # Will immediately start a loadtest with the given configuration

Output

Summary:
 Total requests:      1000
 Loadtest duration:   823 ms
 Slowest:             57 ms
 Fastest:             21 ms
 Average:             40.02 ms
 Requests/sec:        1215.07

Histogram:
  21 ms: 1
  25 ms: 4
  29 ms: 23
  33 ms: 153
  37 ms: 242
  41 ms: 246
  45 ms: 202
  49 ms: 95
  53 ms: 26
  57 ms: 8
  61 ms: 0

Latency Distribution:
  10% in 28 ms
  25% in 36 ms
  50% in 31 ms
  75% in 43 ms
  90% in 48 ms
  95% in 50 ms
  99% in 54 ms

Error distribution:
 Successes   1000
 Errors      0