@loadstrike/loadstrike-sdk
v1.0.10101
Published
TypeScript and JavaScript SDK for in-process load execution, traffic correlation, and reporting.
Maintainers
Readme
LoadStrike for TypeScript and JavaScript
LoadStrike is a TypeScript and JavaScript SDK for defining and running load, traffic-correlation, and reporting scenarios directly inside your application or test process.
Requirements
- Node.js 20 or later
Install
npm install @loadstrike/loadstrike-sdkWhat It Provides
- Scenario, step, load-simulation, threshold, and metric primitives
- Native in-process execution with structured run results
- Local and distributed cluster execution helpers
- HTML, TXT, CSV, and Markdown report generation
Supported Transports
- HTTP
- Kafka
- RabbitMQ
- NATS
- Redis Streams
- Azure Event Hubs
- Push Diffusion
- Delegate and custom stream endpoints
Supported Reporting Sinks
- InfluxDB
- TimescaleDB
- Grafana Loki
- Datadog
- Splunk HEC
- OpenTelemetry Collector
Quick Start
import {
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep
} from "@loadstrike/loadstrike-sdk";
const scenario = LoadStrikeScenario
.create("orders", async (context) => {
return LoadStrikeStep.run(
"publish-order",
context,
async () => LoadStrikeResponse.ok("200")
);
})
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
const result = await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_runner_key")
.run();A valid RunnerKey is required to execute live workloads.
Documentation
https://loadstrike.com/documentation
