blaze-performance-tester 1.0.0 → 1.0.2
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/package.json +1 -1
- package/readme +97 -0
package/package.json
CHANGED
package/readme
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 🔥 Blaze Performance Tester
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Key Features
|
|
8
|
+
|
|
9
|
+
* **Multi-Threaded Concurrency Core:** Spawns lightweight native OS threads for every Virtual User (VU) to bypass common runtime bottlenecks.
|
|
10
|
+
* **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
|
+
* **JMeter-Style Telemetry Aggregation:** Computes live data snapshots including throughput rates, error tallies, and crucial latency percentiles ($p50$, $p90$, $p95$, $p99$).
|
|
12
|
+
* **Real-Time Terminal Progress Updates:** Keeps you updated via a live terminal countdown ticker while heavy parallel workloads run.
|
|
13
|
+
* **CSV Result Archiver:** Automatically records every workload run into structured `.csv` reports inside the `results/` folder for data charting.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🛠️ Project Workspace Layout
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
blaze-performance-tester/
|
|
21
|
+
├── dist/ # Compiled Distribution Assets
|
|
22
|
+
│ ├── cli.js # Bundled CLI Wrapper Script
|
|
23
|
+
│ ├── index.js # Generated Native NAPI-RS Bridges
|
|
24
|
+
│ └── index.d.ts # TypeScript Type Structure Mappings
|
|
25
|
+
├── results/ # Aggregated Report Output Artifacts
|
|
26
|
+
│ └── summary_report.csv # JMeter-style CSV performance dump
|
|
27
|
+
├── src/
|
|
28
|
+
│ └── lib.rs # Multi-Threaded Rust Concurrency Core
|
|
29
|
+
├── tests/ # Dedicated Folder for Performance Scripts
|
|
30
|
+
│ └── demo-load-test.ts # Scenario Workload Script
|
|
31
|
+
├── cli.ts # CLI Orchestration & Metrics Wrapper
|
|
32
|
+
├── package.json # Node Dependency Pipeline
|
|
33
|
+
└── Cargo.toml # Rust Native Compilation Flags
|
|
34
|
+
📦 Compilation & Installation
|
|
35
|
+
Prerequisites
|
|
36
|
+
Ensure you have the following installed on your machine:
|
|
37
|
+
|
|
38
|
+
Node.js (v18+)
|
|
39
|
+
|
|
40
|
+
Rust & Cargo MSRV Toolchain
|
|
41
|
+
|
|
42
|
+
Setup & Build
|
|
43
|
+
Clone the repository, download dependencies, and compile the native binary distribution bundle:
|
|
44
|
+
|
|
45
|
+
Bash
|
|
46
|
+
# Install node dependencies
|
|
47
|
+
npm install
|
|
48
|
+
|
|
49
|
+
# Compile the native Rust modules and bundle the TypeScript CLI wrapper
|
|
50
|
+
npm run build
|
|
51
|
+
🏃 Run Performance Workloads
|
|
52
|
+
To run a performance test script, call the core execution runner by passing your target test file, the number of parallel virtual users (VUs), and the test duration in seconds:
|
|
53
|
+
|
|
54
|
+
Bash
|
|
55
|
+
# Usage: npx tsx cli.ts <script-path> <vus> <duration-seconds>
|
|
56
|
+
npx tsx cli.ts tests/demo-load-test.ts 10 5
|
|
57
|
+
Writing a Workload Script (tests/demo-load-test.ts)
|
|
58
|
+
Your scripts have access to the injected, native http_get global socket binding:
|
|
59
|
+
|
|
60
|
+
TypeScript
|
|
61
|
+
// Call the high-speed native network layer directly
|
|
62
|
+
const status = http_get("[https://jsonplaceholder.typicode.com/posts/1](https://jsonplaceholder.typicode.com/posts/1)");
|
|
63
|
+
|
|
64
|
+
// The engine automatically registers response times and error states!
|
|
65
|
+
📊 Sample Performance Output Report
|
|
66
|
+
When your test finishes running, Blaze renders a clean telemetry report right in your terminal and saves a copy to disk:
|
|
67
|
+
|
|
68
|
+
Plaintext
|
|
69
|
+
📊 ==================== JMeter-Style Performance Report ====================
|
|
70
|
+
Samples (Requests): 14,250
|
|
71
|
+
Throughput Rate: 2,850.00 req/sec
|
|
72
|
+
Error Rate: 0.00% (0 failed)
|
|
73
|
+
-----------------------------------------------------------------------------
|
|
74
|
+
📈 Latency Statistics (ms):
|
|
75
|
+
├── Minimum: 2.10 ms
|
|
76
|
+
├── Average: 3.45 ms
|
|
77
|
+
├── Median (50%): 3.20 ms
|
|
78
|
+
└── 90th %ile: 4.10 ms
|
|
79
|
+
└── 95th %ile: 4.65 ms
|
|
80
|
+
└── 99th %ile: 5.90 ms
|
|
81
|
+
└── Maximum: 12.40 ms
|
|
82
|
+
=============================================================================
|
|
83
|
+
💾 Aggregated metrics saved to: .\results\summary_report.csv
|
|
84
|
+
🧙 Interactive Scaffolding Wizard (create-blaze-tester)
|
|
85
|
+
We provide a companion initializer utility to quickly set up new projects with an organized workspace folder structure.
|
|
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.
|
|
94
|
+
|
|
95
|
+
Injects an example boilerplate script file (demo-load-test.ts).
|
|
96
|
+
|
|
97
|
+
Appends test runner shortcut hooks directly into your local package.json.
|