blaze-performance-tester 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +33 -2606
- package/package.json +3 -3
- package/readme +27 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blaze-performance-tester",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "A high-performance, multi-threaded load testing engine built with Rust and QuickJS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"bin.js",
|
|
16
16
|
"blaze.win32-x64-msvc.node"
|
|
17
17
|
],
|
|
18
|
-
|
|
18
|
+
"scripts": {
|
|
19
19
|
"prebuild": "node -e \"if (!fs.existsSync('dist')) fs.mkdirSync('dist')\"",
|
|
20
20
|
"build:rust": "napi build --platform --release --js dist/index.js --dts dist/index.d.ts",
|
|
21
|
-
"build:cli": "esbuild cli.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/cli.js",
|
|
21
|
+
"build:cli": "esbuild cli.ts --bundle --platform=node --format=esm --packages=external --banner:js=\"#!/usr/bin/env node\" --outfile=dist/cli.js",
|
|
22
22
|
"postbuild": "node -e \"fs.copyFileSync('blaze.win32-x64-msvc.node', 'dist/blaze.win32-x64-msvc.node')\"",
|
|
23
23
|
"build": "npm run build:rust && npm run build:cli && npm run postbuild"
|
|
24
24
|
},
|
package/readme
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
Markdown
|
|
1
2
|
# 🔥 Blaze Performance Tester
|
|
2
3
|
|
|
3
4
|
Blaze is an ultra-high-performance, multi-threaded load testing framework built with **Rust** and **QuickJS** (via `rquickjs`). It provides parallel virtual user execution by isolating JavaScript evaluation environments into dedicated native OS threads, delivering raw network speed and JMeter-style telemetry metrics with minimal footprint.
|
|
@@ -10,7 +11,7 @@ Blaze is an ultra-high-performance, multi-threaded load testing framework built
|
|
|
10
11
|
* **Native HTTP Execution Sockets:** Exposes a global `http_get()` binding inside JavaScript that routes network calls directly through Rust's high-speed `reqwest` stack.
|
|
11
12
|
* **JMeter-Style Telemetry Aggregation:** Computes live data snapshots including throughput rates, error tallies, and crucial latency percentiles ($p50$, $p90$, $p95$, $p99$).
|
|
12
13
|
* **Real-Time Terminal Progress Updates:** Keeps you updated via a live terminal countdown ticker while heavy parallel workloads run.
|
|
13
|
-
* **CSV
|
|
14
|
+
* **Zero-Configuration CSV Archiver:** Automatically records data into structured `.csv` reports inside a `results/` folder created dynamically wherever you invoke the command.
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -19,17 +20,17 @@ Blaze is an ultra-high-performance, multi-threaded load testing framework built
|
|
|
19
20
|
```text
|
|
20
21
|
blaze-performance-tester/
|
|
21
22
|
├── dist/ # Compiled Distribution Assets
|
|
22
|
-
│ ├── cli.js # Bundled CLI
|
|
23
|
+
│ ├── cli.js # Bundled CLI Core
|
|
23
24
|
│ ├── index.js # Generated Native NAPI-RS Bridges
|
|
24
|
-
│
|
|
25
|
-
|
|
26
|
-
│ └── summary_report.csv # JMeter-style CSV performance dump
|
|
25
|
+
│ ├── index.d.ts # TypeScript Type Structure Mappings
|
|
26
|
+
│ └── blaze.*.node # Compiled Native Rust Binary
|
|
27
27
|
├── src/
|
|
28
28
|
│ └── lib.rs # Multi-Threaded Rust Concurrency Core
|
|
29
29
|
├── tests/ # Dedicated Folder for Performance Scripts
|
|
30
|
-
│ └──
|
|
30
|
+
│ └── test-script.ts # Scenario Workload Script
|
|
31
|
+
├── bin.js # Anti-Hijack Executable Gateway for Windows WSH
|
|
31
32
|
├── cli.ts # CLI Orchestration & Metrics Wrapper
|
|
32
|
-
├── package.json # Node Dependency Pipeline
|
|
33
|
+
├── package.json # Node Dependency & Build Script Pipeline
|
|
33
34
|
└── Cargo.toml # Rust Native Compilation Flags
|
|
34
35
|
📦 Compilation & Installation
|
|
35
36
|
Prerequisites
|
|
@@ -43,25 +44,27 @@ Setup & Build
|
|
|
43
44
|
Clone the repository, download dependencies, and compile the native binary distribution bundle:
|
|
44
45
|
|
|
45
46
|
Bash
|
|
46
|
-
# Install
|
|
47
|
+
# Install package dependencies
|
|
47
48
|
npm install
|
|
48
49
|
|
|
49
|
-
# Compile the native Rust modules and bundle the
|
|
50
|
+
# Compile the native Rust modules, copy binaries, and bundle the ESM CLI wrapper
|
|
50
51
|
npm run build
|
|
51
52
|
🏃 Run Performance Workloads
|
|
52
|
-
|
|
53
|
+
Blaze can be executed globally from any terminal folder via npx without needing global system mutations.
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
To run a test, navigate to your target project folder, create your script file, and call the runner passing the script path, the number of concurrent Virtual Users (VUs), and the test duration in seconds:
|
|
56
|
+
|
|
57
|
+
DOS
|
|
58
|
+
# Usage: npx blaze-performance-tester <script-path> <vus> <duration-seconds>
|
|
59
|
+
npx blaze-performance-tester tests/test-script.ts 10 5
|
|
60
|
+
Writing a Workload Script (tests/test-script.ts)
|
|
61
|
+
Your script workloads have instant access to the injected high-speed global native socket binding:
|
|
59
62
|
|
|
60
63
|
TypeScript
|
|
61
64
|
// Call the high-speed native network layer directly
|
|
62
65
|
const status = http_get("[https://jsonplaceholder.typicode.com/posts/1](https://jsonplaceholder.typicode.com/posts/1)");
|
|
63
66
|
|
|
64
|
-
// The engine automatically
|
|
67
|
+
// The native Rust engine automatically handles response times and error states!
|
|
65
68
|
📊 Sample Performance Output Report
|
|
66
69
|
When your test finishes running, Blaze renders a clean telemetry report right in your terminal and saves a copy to disk:
|
|
67
70
|
|
|
@@ -81,17 +84,12 @@ Plaintext
|
|
|
81
84
|
└── Maximum: 12.40 ms
|
|
82
85
|
=============================================================================
|
|
83
86
|
💾 Aggregated metrics saved to: .\results\summary_report.csv
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
To execute the setup wizard out of an empty workspace directory, run:
|
|
88
|
-
|
|
89
|
-
Bash
|
|
90
|
-
npm init blaze-tester
|
|
91
|
-
This interactive prompt automatically:
|
|
92
|
-
|
|
93
|
-
Provisions a dedicated tests/ directory.
|
|
87
|
+
📂 Where are results stored?
|
|
88
|
+
Blaze captures execution contexts using process.cwd(). The moment a test run completes successfully, a new directory is instantly written inside the user's active terminal directory:
|
|
94
89
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
Plaintext
|
|
91
|
+
your-active-directory/
|
|
92
|
+
├── tests/
|
|
93
|
+
│ └── test-script.ts
|
|
94
|
+
└── results/ <-- Generated Automatically
|
|
95
|
+
└── summary_report.csv <-- Contains Raw Timestamp, Latency, Status, and Success Flags
|