ns-benchmark-run

Benchmarks a single Node.js function and reports throughput statistics in a markdown report.

6|7|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/nodesource/nsolid-plugin --skill ns-benchmark-run-nodesource
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ns-benchmark-run
Source: https://github.com/nodesource/nsolid-plugin/tree/main/skills/ns-benchmark-run
Command: npx skills add https://github.com/nodesource/nsolid-plugin --skill ns-benchmark-run-nodesource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Measuring how fast a Node.js function actually runs requires careful setup: realistic arguments, mocked dependencies, and statistically meaningful repetition. This Skill automates that process by deriving benchmark inputs from real call sites and tests in your codebase, running the benchmark through the ns-benchmark MCP server, and producing a structured performance report. ## Core Features & Use Cases - Evidence-based argument generation: Searches your workspace for real invocation sites and tests to build realistic args and argSetupCode mocks for complex dependencies like databases, file systems, and event emitters. - Configurable benchmark engine: Controls repeatSuite, minSamples, minTime, and maxTime, with a mandatory user confirmation step before any benchmark runs. - Structured reporting: Produces a markdown report with ops/sec, iterations, histogram min/max, variance assessment, and a full tool execution log, optionally saved to .nsolid/assets/. - Use Case: You suspect a utility function is a hot-path bottleneck. Point the Skill at the function, confirm the proposed arguments derived from its unit tests, and receive a table showing ops/sec and variance diagnostics suggesting whether JIT tier transitions or GC pauses are affecting consistency. ## Quick Start Ask the AI to benchmark a specific function in your workspace, for example: benchmark the parseQuery function in src/utils.js and show me its ops/sec.

Frequently Asked Questions about ns-benchmark-run

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I benchmark a Node.js function and measure ops/sec?▼

Point the Skill at the target function in your workspace. It extracts the code, derives arguments from real call sites and tests, asks you to confirm the inputs and configuration, then runs the benchmark and reports ops/sec, iterations, and histogram statistics.

How are benchmark arguments and mocks generated?▼

Arguments are derived from actual invocation sites and unit tests found in the codebase. Complex external dependencies like databases or event emitters are added as explicit function parameters, mocked in argSetupCode, and referenced by parameter name in args.

When should I use ns-validate-optimization instead of a single benchmark run?▼

Use ns-validate-optimization when you need an A/B proof comparing an original and an optimized version of code. Use this Skill only for baseline measurement of one function's throughput without any comparison.

What do high variance results in a benchmark histogram mean?▼

A wide min/max spread suggests inconsistent performance caused by V8 JIT tier transitions, GC pauses on allocating functions, system load, or input sensitivity. The report recommends increasing repeatSuite or minSamples and inspecting per-run ops/sec for outliers.

Can I adjust the benchmark configuration before running?▼

Yes. Before any benchmark tool is called, the Skill presents repeatSuite, minSamples, minTime, and maxTime for your review. You can approve them, request adjustments for accuracy or speed, or provide manual edits.