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

@apexdevtools/benchmarker

v6.1.0

Published

Benchmarks performance of processes on Salesforce Orgs

Readme

Benchmarker

A performance testing framework, which orchestrates, profiles, and persists stats from test scenarios run on Salesforce orgs.

Usage

Tests are executed using different templates in a JavaScript testing framework (For example, Mocha, Jest). Results are saved to a provided PostgreSQL database. Alerts for performance degradations can be stored in the database as well. See the alerts documentation for more details.

The TransactionTestTemplate calls a function (FlowStep, most often created by helpers) to execute some anonymous Apex code provided for the test. The Apex can come from a file or inline as a string. This Apex code can also collect Governor limit metrics which will be extracted at the end of the test. After all tests are complete, data attributed to the template can be saved. For a sample execution, see test_system/basic.test.ts.

Development

Building

Available scripts:

  • npm run build - Clean rebuild ready to pack or run.
  • npm run compile - Run typescript compile only.
  • npm test - Run unit tests.
  • npm run test:only -- - Run tests with args passed to mocha.
    • e.g. npm run test:only -- 'path/to/test.ts' -f 'specific test case'
    • Pass path/glob to run specific files, use -f to match cases.

Testing

Running system tests requires a Salesforce Org and Docker. The instructions below assume you have installed Docker, Salesforce CLI, and have a Dev Hub set up. To use another type of org, multiple environment variables need setting with credentials, see .env.example and test_system/.env.

  1. Create a scratch org:

    sf org create scratch -f test_system/config/scratch-org.json -a bench_testing
  2. Start the docker database with docker compose up -d. It is accessible by the host on port 5433, and via adminer control panel at localhost:8081 to review results.

  3. (Run once) Init system test env file with npm run test:system:init. Uncomment SFDX_USERNAME= and update to SFDX_USERNAME=bench_testing. Optionally set any other variables for all tests to use, like STORE_ALERTS.

  4. Finally, run tests:

    npm run test:system

License

All the source code included uses a 3-clause BSD license, see LICENSE for details.