blaze-performance-tester 3.1.17 → 3.1.18
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 +32 -69
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -293,8 +293,6 @@ async function runIntelligentAgenticStressTest(config) {
|
|
|
293
293
|
const analyzer = new LogAnalyzer();
|
|
294
294
|
semanticReport = analyzer.process(aggregateErrorLogs);
|
|
295
295
|
}
|
|
296
|
-
const totalTestSeconds = history.length * config.durationSec;
|
|
297
|
-
const vuRampUpVelocity = history.length > 1 && totalTestSeconds > 0 ? (history[history.length - 1].threads - history[0].threads) / totalTestSeconds : config.threads / config.durationSec;
|
|
298
296
|
const finalSummaryCards = {
|
|
299
297
|
apdex: history[history.length - 1]?.apdex || 0,
|
|
300
298
|
throughput: history[history.length - 1]?.throughput || 0,
|
|
@@ -304,8 +302,7 @@ async function runIntelligentAgenticStressTest(config) {
|
|
|
304
302
|
tcp: mathUtils.mean(globalMetricsAccumulator.tcp),
|
|
305
303
|
tls: mathUtils.mean(globalMetricsAccumulator.tls),
|
|
306
304
|
stdDev: mathUtils.stdDev(globalMetricsAccumulator.latencies, mathUtils.mean(globalMetricsAccumulator.latencies)),
|
|
307
|
-
saturationKneePoint: saturationKneePoint || history[history.length - 1]?.threads || 50
|
|
308
|
-
vuRampUpVelocity
|
|
305
|
+
saturationKneePoint: saturationKneePoint || history[history.length - 1]?.threads || 50
|
|
309
306
|
};
|
|
310
307
|
generateFinalAgentReport(history);
|
|
311
308
|
exportHtmlDashboard(history, config, verdictReason, semanticReport, { total1xx, total2xx, total3xx, total4xx, total5xx }, finalSummaryCards, lastRawRequests);
|
|
@@ -340,8 +337,7 @@ async function runStandardStressTest(config) {
|
|
|
340
337
|
tcp: metrics.avgTcpMs,
|
|
341
338
|
tls: metrics.avgTlsMs,
|
|
342
339
|
stdDev: metrics.stdDevMs,
|
|
343
|
-
saturationKneePoint: config.threads
|
|
344
|
-
vuRampUpVelocity: config.threads / config.durationSec
|
|
340
|
+
saturationKneePoint: config.threads
|
|
345
341
|
};
|
|
346
342
|
const isPassed = metrics.apdexScore >= config.targetApdex && metrics.errorRate <= config.targetErrorRate;
|
|
347
343
|
const verdictReason = isPassed ? "Static single-wave baseline checks concluded successfully without triggering health boundaries." : "Static verification loop completed with values exceeding defined quality thresholds.";
|
|
@@ -484,14 +480,23 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
484
480
|
logClustersHtml = `
|
|
485
481
|
<div class="card" style="margin-top: 2rem; background: #131c2e; border: 1px solid #1e293b;">
|
|
486
482
|
<h3 style="border-bottom: none; padding-bottom: 0rem; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.5rem; color: #ffffff; font-size: 1.2rem;">
|
|
487
|
-
\u{1F9E0}
|
|
483
|
+
\u{1F9E0} Semantic Log Clustering & Error Classification
|
|
488
484
|
</h3>
|
|
489
485
|
<div style="color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.5rem;">
|
|
490
|
-
Captured <strong style="color: #f8fafc;">${totalLogCount}</strong> raw failures grouped into <strong style="color: #f8fafc;">${uniquePatternsCount}</strong> unique structural patterns.
|
|
486
|
+
Captured <strong style="color: #f8fafc;">${totalLogCount}</strong> raw failures grouped into <strong style="color: #f8fafc;">${uniquePatternsCount}</strong> unique structural patterns.
|
|
491
487
|
</div>
|
|
492
488
|
|
|
493
|
-
<
|
|
494
|
-
|
|
489
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
490
|
+
<thead>
|
|
491
|
+
<tr style="border-bottom: 1px solid #1e293b;">
|
|
492
|
+
<th style="width: 8%; padding: 0.75rem; text-align: left; color: #64748b; font-size: 0.85rem; font-weight: bold; text-transform: none;">Count</th>
|
|
493
|
+
<th style="width: 22%; padding: 0.75rem; text-align: left; color: #64748b; font-size: 0.85rem; font-weight: bold; text-transform: none;">Classification Category</th>
|
|
494
|
+
<th style="width: 10%; padding: 0.75rem; text-align: left; color: #64748b; font-size: 0.85rem; font-weight: bold; text-transform: none;">Severity</th>
|
|
495
|
+
<th style="width: 60%; padding: 0.75rem; text-align: left; color: #64748b; font-size: 0.85rem; font-weight: bold; text-transform: none;">Structural Abstract Blueprint / Dynamic Log Fingerprint</th>
|
|
496
|
+
</tr>
|
|
497
|
+
</thead>
|
|
498
|
+
<tbody>
|
|
499
|
+
${semanticReport.clusters.map((c) => {
|
|
495
500
|
let catColor = "#fb923c";
|
|
496
501
|
if (c.category === "Authentication_Error") catColor = "#c084fc";
|
|
497
502
|
if (c.category === "Product_Error") catColor = "#f87171";
|
|
@@ -499,53 +504,25 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
499
504
|
let sevBg = c.severity === "CRITICAL" ? "#dc2626" : "#ea580c";
|
|
500
505
|
const rawTemplate = c.template || "";
|
|
501
506
|
const cleanedTemplate = rawTemplate.replace(/\[\d{4}-\d{2}-\d{2}.*?\]\s*/, "");
|
|
502
|
-
const clarityBonus = c.severity === "CRITICAL" ? 15 : 8;
|
|
503
|
-
const freqScore = Math.min(25, c.count * 0.5);
|
|
504
|
-
const confidenceScore = Math.min(99, Math.round(65 + freqScore + clarityBonus));
|
|
505
|
-
let confColor = "#10b981";
|
|
506
|
-
if (confidenceScore < 80) confColor = "#f59e0b";
|
|
507
|
-
if (confidenceScore < 70) confColor = "#ef4444";
|
|
508
|
-
let fixTitle = "Infrastructure Pool & Tuning Fix";
|
|
509
|
-
let fixCode = "const pool = new Pool({ max: 50, idleTimeoutMillis: 30000 });";
|
|
510
|
-
let explanation = "High concurrency is causing socket/connection starvation. Increase connection limits or enable pooling keep-alives.";
|
|
511
|
-
if (c.category === "Authentication_Error") {
|
|
512
|
-
fixTitle = "Auth Token / JWT Strategy";
|
|
513
|
-
fixCode = "// Implement token caching and silent rotation\napp.use(authMiddleware({ cacheTtl: 300, allowGracePeriod: 60 }));";
|
|
514
|
-
explanation = "Frequent token verification failures under load. Extend signature verification cache or decouple auth validation check.";
|
|
515
|
-
} else if (c.category === "Product_Error") {
|
|
516
|
-
fixTitle = "Application Null-Safety / Guard Fix";
|
|
517
|
-
fixCode = "const configId = payload?.config_id ?? defaultConfigurationId;\nif (!configId) throw new ValidationError('Missing config_id');";
|
|
518
|
-
explanation = "Runtime reference error for undefined payload field under race condition spikes. Add optional chaining and input contracts.";
|
|
519
|
-
}
|
|
520
|
-
const snippetId = `snippet-${idx}`;
|
|
521
507
|
return `
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
<
|
|
525
|
-
|
|
526
|
-
<span style="
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
<div style="color: #64748b; font-size: 0.75rem; text-transform: uppercase; font-weight: bold; margin-bottom: 0.25rem;">Detected Log Fingerprint</div>
|
|
535
|
-
<code style="color: #cbd5e1; font-family: monospace; font-size: 0.85rem; word-break: break-all;">${cleanedTemplate}</code>
|
|
536
|
-
</div>
|
|
537
|
-
<div style="margin-bottom: 1.25rem;">
|
|
538
|
-
<div style="color: #38bdf8; font-size: 0.9rem; font-weight: bold; margin-bottom: 0.25rem;">\u{1F4A1} Playbook Strategy: ${fixTitle}</div>
|
|
539
|
-
<div style="color: #94a3b8; font-size: 0.85rem; line-height: 1.4; margin-bottom: 0.75rem;">${explanation}</div>
|
|
540
|
-
<div style="position: relative; background: #0b111e; border: 1px solid #1e293b; border-radius: 4px; padding: 0.75rem;">
|
|
541
|
-
<button onclick="copyToClipboard('${snippetId}')" style="position: absolute; top: 0.5rem; right: 0.5rem; background: #1e293b; color: #38bdf8; border: none; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.7rem; cursor: pointer;">Copy Fix</button>
|
|
542
|
-
<pre id="${snippetId}" style="margin: 0; color: #4ade80; font-family: monospace; font-size: 0.85rem; white-space: pre-wrap;">${fixCode}</pre>
|
|
508
|
+
<tr style="border-bottom: 1px solid #1e293b; vertical-align: top;">
|
|
509
|
+
<td style="padding: 1.25rem 0.75rem; font-size: 1.2rem; font-weight: bold; color: #f8fafc;">${c.count}</td>
|
|
510
|
+
<td style="padding: 1.25rem 0.75rem; color: ${catColor}; font-weight: 600; font-size: 0.95rem;">${c.category}</td>
|
|
511
|
+
<td style="padding: 1.25rem 0.75rem;">
|
|
512
|
+
<span style="background: ${sevBg}; color: #ffffff; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: bold; letter-spacing: 0.05em;">${c.severity}</span>
|
|
513
|
+
</td>
|
|
514
|
+
<td style="padding: 1.25rem 0.75rem;">
|
|
515
|
+
<div style="background: #090d16; border-radius: 4px; padding: 0.6rem 0.8rem; border-left: 3px solid #1e293b; margin-bottom: 0.5rem;">
|
|
516
|
+
<code style="color: #cbd5e1; font-family: monospace; font-size: 0.9rem; white-space: pre-wrap; word-break: break-all;">${cleanedTemplate}</code>
|
|
517
|
+
</div>
|
|
518
|
+
<div style="color: #64748b; font-size: 0.8rem; font-family: monospace; padding-left: 0.2rem; line-height: 1.4;">
|
|
519
|
+
<span style="color: #475569;">Real Example Trace:</span> ${rawTemplate}
|
|
543
520
|
</div>
|
|
544
|
-
</
|
|
545
|
-
</
|
|
546
|
-
</details>`;
|
|
521
|
+
</td>
|
|
522
|
+
</tr>`;
|
|
547
523
|
}).join("")}
|
|
548
|
-
|
|
524
|
+
</tbody>
|
|
525
|
+
</table>
|
|
549
526
|
</div>`;
|
|
550
527
|
}
|
|
551
528
|
const liveAdjusterHtml = `
|
|
@@ -603,7 +580,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
603
580
|
h1 { color: #38bdf8; margin: 0; font-size: 2rem; }
|
|
604
581
|
.meta { color: #94a3b8; font-size: 0.9rem; margin-top: 0.5rem; }
|
|
605
582
|
|
|
606
|
-
.cards-wrapper { display: grid; grid-template-columns: repeat(
|
|
583
|
+
.cards-wrapper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
|
|
607
584
|
.metric-card { background: #131c2e; border: 1px solid #1e293b; border-radius: 6px; padding: 1.25rem; position: relative; }
|
|
608
585
|
.card-title { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
|
|
609
586
|
.card-value { font-size: 1.6rem; font-weight: 700; color: #ffffff; }
|
|
@@ -611,7 +588,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
611
588
|
.card-value.green { color: #10b981; }
|
|
612
589
|
.card-value.orange { color: #f97316; }
|
|
613
590
|
.card-value.purple { color: #a855f7; }
|
|
614
|
-
.card-value.cyan { color: #38bdf8; }
|
|
615
591
|
.card-subtext { font-size: 0.8rem; color: #10b981; font-weight: 500; margin-left: 0.4rem; display: inline-block; }
|
|
616
592
|
|
|
617
593
|
.top-layout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 1.5rem; margin-bottom: 2rem; }
|
|
@@ -670,10 +646,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
670
646
|
<div class="card-title">Avg Time To First Byte</div>
|
|
671
647
|
<div class="card-value">${cards.ttfb.toFixed(1)}<span class="unit">ms</span></div>
|
|
672
648
|
</div>
|
|
673
|
-
<div class="metric-card">
|
|
674
|
-
<div class="card-title">VU Ramp-up Velocity</div>
|
|
675
|
-
<div class="card-value cyan">${cards.vuRampUpVelocity.toFixed(1)}<span class="unit">VUs/s</span></div>
|
|
676
|
-
</div>
|
|
677
649
|
<div class="metric-card">
|
|
678
650
|
<div class="card-title">DNS Lookup</div>
|
|
679
651
|
<div class="card-value">${cards.dns.toFixed(2)}<span class="unit">ms</span></div>
|
|
@@ -788,15 +760,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
788
760
|
</div>
|
|
789
761
|
|
|
790
762
|
<script>
|
|
791
|
-
function copyToClipboard(containerId) {
|
|
792
|
-
const text = document.getElementById(containerId).innerText;
|
|
793
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
794
|
-
alert('Copied remediation snippet to clipboard!');
|
|
795
|
-
}).catch(err => {
|
|
796
|
-
console.error('Failed to copy text: ', err);
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
|
|
800
763
|
const labels = ${JSON.stringify(labels)};
|
|
801
764
|
const baseThroughput = ${cards.throughput};
|
|
802
765
|
const baseLatency = ${cards.ttfb};
|
|
Binary file
|