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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@o1s/redis-testbench

v1.0.2

Published

Redis (single instance and cluster) test bench

Readme

Redis Test Bench

Provide means to spin up & connect to:

  • a redis instance,
  • a redis cluster, composed of 3 shards, with 1 replica each,
  • a set of monitors, that logs:
    • (almost all) redis commands,
    • expiring entries.

Note that the npm package only adds a simple function to create an IORedis client, for either standalone Redis instance or for the Redis Cluster.

Installation

To be able to connect to the redis instance or cluster: npm install @o1s/redis-testbench

You can use the exported function buildClient, which will return an IORedis client (for standalone Redis instance or for a Redis Cluster).

To boot the services, clone this repo and read the title Redis and Redis Cluster services below.

Connectivity

Connecting to Redis services

  • The single redis service is available:
    • outside docker-compose: as localhost:6379
    • inside docker-compose: as redis:6379
  • The redis-cluster services are available:
    • outside docker-compose: localhost:6380 to localhost:6385 (requires nat support if ioredis is used).
    • inside docker-compose: as redis-node-0:6379 to redis-node-5:6379.

API Provided

  • buildClient returns the required redis client (either for a single Redis instance or for the Redis Cluster).
  • buildOptionsFromEnv builds the required options from env vars.

Redis and Redis Cluster services

Docker and Docker Compose services should be started from a git clone of this repo, not from the npm installed.

To start all redis and redis cluster services:

. .setup.sh
docker-compose up --build

To start the redis instance alone:

docker-compose up --build redis redis-monitor redis-watch-expirations

To start only the redis cluster (6 nodes: 3 primaries + 1 replica each):

. .setup.sh
docker-compose up --build \
  redis-node-0 \
  redis-node-1 \
  redis-node-2 \
  redis-node-3 \
  redis-node-4 \
  redis-node-5 \
  redis-monitor-0 \
  redis-monitor-1 \
  redis-monitor-2 \
  redis-monitor-3 \
  redis-monitor-4 \
  redis-monitor-5 \
  redis-watch-expirations-0 \
  redis-watch-expirations-1 \
  redis-watch-expirations-2 \
  redis-watch-expirations-3 \
  redis-watch-expirations-4 \
  redis-watch-expirations-5
  • redis-node-*: these are the actual redis services
  • redis-monitor-*: these will list (almost all) redis commands
  • redis-watch-expirations-*: these will list entry expirations.

To do a clean start state:

. .setup.sh
docker-compose down;
docker-compose rm -f \
  redis-node-0 \
  redis-node-1 \
  redis-node-2 \
  redis-node-3 \
  redis-node-4 \
  redis-node-5;
docker-compose up --build;

The commands above can be run with:

bash -i start.sh