blaze-performance-tester 3.1.61 → 3.1.62

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 CHANGED
@@ -23,7 +23,13 @@ var LogAnalyzer = class {
23
23
  return { category: "Environment_Infrastructure_Error", severity: "CRITICAL" };
24
24
  }
25
25
  if (LowercaseTpl.includes("401") || LowercaseTpl.includes("403") || LowercaseTpl.includes("unauthorized") || LowercaseTpl.includes("forbidden") || LowercaseTpl.includes("jwt") || LowercaseTpl.includes("token expired")) {
26
- return { category: "Authentication_Error", severity: "CRITICAL" };
26
+ return { category: "Authentication_Error", severity: "HIGH" };
27
+ }
28
+ if (LowercaseTpl.includes("429") || LowercaseTpl.includes("rate limit") || LowercaseTpl.includes("too many requests")) {
29
+ return { category: "Traffic_Management_Error", severity: "MEDIUM" };
30
+ }
31
+ if (LowercaseTpl.includes("typeerror") || LowercaseTpl.includes("undefined") || LowercaseTpl.includes("nullpointer") || LowercaseTpl.includes("cannot read properties")) {
32
+ return { category: "Product_Error", severity: "CRITICAL" };
27
33
  }
28
34
  return { category: "Product_Error", severity: "WARNING" };
29
35
  }
@@ -31,16 +37,17 @@ var LogAnalyzer = class {
31
37
  * Generates actionable architectural and code-level fixes based on log structural fingerprints
32
38
  */
33
39
  generatePlaybook(template, severity) {
34
- if (severity !== "CRITICAL" && severity !== "HIGH") {
40
+ if (severity !== "CRITICAL" && severity !== "HIGH" && severity !== "MEDIUM") {
35
41
  return void 0;
36
42
  }
43
+ const lowerTemplate = template.toLowerCase();
37
44
  if (template.includes("ECONNREFUSED") || template.includes("5432")) {
38
45
  return `**Database Connectivity Failure**
39
46
  1. **Service Triage:** Verify the target PostgreSQL instance at 127.0.0.1:5432 is running using \`pg_isready\`.
40
47
  2. **Resource Exhaustion:** Scale up the \`max_connections\` configuration value within \`postgresql.conf\`.
41
48
  3. **Pool Allocation:** Implement an intermediate connection pool architecture (e.g., PgBouncer) to multiplex open client socket handles under heavy concurrent execution paths.`;
42
49
  }
43
- if (template.includes("504 Gateway Timeout") || template.includes("upstream socket drop")) {
50
+ if (template.includes("504 Gateway Timeout") || template.includes("upstream socket drop") || template.includes("Timeout")) {
44
51
  return `**Upstream Gateway Timeout Saturation**
45
52
  1. **Timeout Alignment:** Ensure proxy gateway network ingress drop timeouts align tightly with upstream processing deadlines.
46
53
  2. **Circuit Breaking:** Introduce adaptive circuit breakers around the processing endpoint to fail fast during database or background service degradation.
@@ -58,10 +65,19 @@ var LogAnalyzer = class {
58
65
  2. **Clock Alignment:** Synchronize target nodes against global Network Time Protocol (NTP) servers to resolve microsecond runtime verification discrepancies.
59
66
  3. **Grace Window:** Configure a short crypto-signature processing grace duration window (e.g., 5-10 seconds) to tolerate delayed network transfer offsets gracefully.`;
60
67
  }
61
- return `**High-Severity System Anomaly Action Plan**
68
+ if (lowerTemplate.includes("429") || lowerTemplate.includes("rate limit") || lowerTemplate.includes("too many requests")) {
69
+ return `**Traffic Rate Limit Triggered**
70
+ 1. **Backoff Mechanism:** Implement exponential backoff with jitter on client-side application logic to safely space out request retry cascades.
71
+ 2. **Threshold Tuning:** Calibrate upstream API Gateway rate-limit configurations to align with real-time horizontal capacity thresholds.
72
+ 3. **Tiered Allocations:** Map client credentials or IP subnets to segmented capacity bands to protect core consumer endpoints.`;
73
+ }
74
+ if (severity === "CRITICAL" || severity === "HIGH") {
75
+ return `**High-Severity System Anomaly Action Plan**
62
76
  1. **Telemetry Trace Mapping:** Isolate the context block Trace ID and map performance timelines to identify execution resource constraints.
63
77
  2. **Host Allocation Audit:** Verify host environment memory usage limits, network interface drops, and CPU usage trends at the time of the fault.
64
78
  3. **Isolation Testing:** Repro the exact exception signature inside sandbox configurations utilizing targeted load testing sweeps.`;
79
+ }
80
+ return void 0;
65
81
  }
66
82
  /**
67
83
  * Processes a stream of raw textual error logs into deduplicated clustered fingerprints
@@ -86,12 +102,16 @@ var LogAnalyzer = class {
86
102
  template = "Error: ECONNREFUSED 127.0.0.1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1)";
87
103
  } else if (cleanLog.includes("TypeError") || cleanLog.includes("Cannot read properties")) {
88
104
  category = "Product_Error";
89
- severity = "HIGH";
105
+ severity = "CRITICAL";
90
106
  template = "TypeError: Cannot read properties of undefined (reading 'config_id') at Object.execute (\\app\\dist\\handler.js:42:19)";
91
- } else if (cleanLog.includes("504 Gateway Timeout")) {
107
+ } else if (cleanLog.includes("504 Gateway Timeout") || cleanLog.includes("upstream socket drop")) {
92
108
  category = "Environment_Infrastructure_Error";
93
109
  severity = "CRITICAL";
94
110
  template = cleanLog.includes("15000ms") ? "HTTP/1.1 504 Gateway Timeout on POST /api/v1/checkout - upstream socket drop after 15000ms" : "HTTP/1.1 504 Gateway Timeout on POST /api/v1/checkout - upstream socket drop after 30000ms";
111
+ } else if (cleanLog.includes("429") || /rate limit|too many requests/i.test(cleanLog)) {
112
+ category = "Traffic_Management_Error";
113
+ severity = "MEDIUM";
114
+ template = "HTTP/1.1 429 Too Many Requests - Rate limit exceeded";
95
115
  }
96
116
  if (!template) {
97
117
  template = this.extractLogTemplate(log);
@@ -314,7 +334,7 @@ function parseArguments(args) {
314
334
  const rampDownIdx = args.indexOf("--ramp-down");
315
335
  if (rampDownIdx !== -1) rampDownSec = parseInt(args[rampDownIdx + 1], 10);
316
336
  const apdexIdx = args.indexOf("--target-apdex");
317
- if (apdexIdx !== -1) targetApdex = parseFloat(apdexIdx + 1);
337
+ if (apdexIdx !== -1) targetApdex = parseFloat(args[apdexIdx + 1]);
318
338
  const errorIdx = args.indexOf("--target-error");
319
339
  if (errorIdx !== -1) targetErrorRate = parseFloat(args[errorIdx + 1]);
320
340
  const maxThreadsIdx = args.indexOf("--max-threads");
@@ -937,7 +957,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
937
957
  const displayColor = rate > 0 ? code >= 500 ? "#f87171" : "#fde047" : "#64748b";
938
958
  return `
939
959
  <div style="background: #090d16; border: 1px solid #1e293b; border-radius: 4px; padding: 0.4rem 0.2rem; text-align: center;">
940
- <div style="font-size: 0.7rem; color: #64748b; font-weight: bold;">${code}</div>
960
+ <div style="font-size: 0.7rem; color: #64748b; font-weight: bold;">Code ${code}</div>
941
961
  <div style="font-size: 0.85rem; font-weight: bold; color: ${displayColor};">${rate.toFixed(2)}%</div>
942
962
  </div>
943
963
  `;
@@ -1203,7 +1223,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
1203
1223
  const feedback = document.getElementById('nlpQueryFeedback');
1204
1224
 
1205
1225
  let filterFn = (row, data) => true;
1206
- const numMatch = q.match(/(d+(?:.d+)?)/);
1226
+ const numMatch = q.match(/(\\d+(?:\\.\\d+)?)/);
1207
1227
  const targetNum = numMatch ? parseFloat(numMatch[1]) : null;
1208
1228
 
1209
1229
  const isGreater = q.includes('>') || q.includes('greater') || q.includes('above') || q.includes('more');
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "3.1.61",
3
+ "version": "3.1.62",
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",