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

opengov-k6-core

v1.0.1

Published

Enhanced k6 core library for efficient load testing

Readme

Description

A robust k6 core library designed to enhance load testing capabilities. It offers extended functionalities for various protocols, custom metrics, aiming to simplify and empower performance testing for developers and QA engineers.

Technologies and tools used:

Setup

Install Node 18.16.0+ or set Node 18.16.0+ as the version to use with this project

nvm use 18.16.0

Contributing

Thank you for considering to contribute to this project! Please review the Contribution Guidelines to begin.

Testing Changes

To test changes to the library, follow these steps:

  1. Build the Project
    Run the following command to build the project:
    yarn build
  2. Package the Library
    Create a packed .tgz file of your library using:
    yarn pack
  3. Copy the Packaged File
    Copy the resulting .tgz file to the dependent project's directory.
  4. Update the Dependency
    Update the package.json in the dependent project to the path of the new .tgz file. For example:
    "dependencies": {
       "opengov-k6-core": "file:path/to/your-library.tgz"
    }```
  5. Install the Updated Package
    Install the updated package with:
    yarn install
  6. Run any Tests
    Execute the tests using any appropriate script from the package.json to ensure everything works as expected:

ThresholdMerger Class

The ThresholdMerger class is designed to manage and merge performance monitoring thresholds. It allows users to easily integrate custom thresholds while default thresholds are maintained as a fallback.

Features:

Complete Replacement:

Custom thresholds provided for a metric completely replace the existing defaults for that metric, rather than merging or appending. This ensures that custom settings are prioritized and simplifies configuration management.

Ease of Use:

Simple and intuitive method interfaces make it straightforward to merge custom thresholds with defaults.

Usage:

To use the ThresholdMerger class within the getLoadProfile function, pass the custom thresholds as the fourth argument. This argument should be an object where the keys are the metric names and the values are arrays of threshold conditions you wish to apply. Ensure that the ThresholdMerger class is properly integrated to handle these thresholds according to the specific requirements of your project.

import customThresholds from '../../../../../../load_rates/samples/rates/thresholds/customThresholds.json';
export const options: Options = getLoadProfile(
  Number(__ENV.DURATION),
  Number(__ENV.VUS),
  scenariosConfig,
  customThresholds,
);
Example of threshold file:
{
  "http_req_duration": ["p(90)<200", "p(95)<300", "avg<250"],
  "http_req_failed": ["rate<0.01"],
  "http_req_connecting": ["p(95)<50"],
  "http_req_sending": ["avg<50"],
  "http_req_receiving": ["avg<3000"]
}

FAQ

  • In case of error Error: error:0308010C:digital envelope routines::unsupported execute following command export NODE_OPTIONS=--openssl-legacy-provider

Support

  • K6 Support Channel
    • #k6-framework
  • General QCE Support
    • #team-qce-support