blaze-performance-tester 3.1.33 → 3.1.34
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 +30 -2
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -467,7 +467,7 @@ function processMetricsTelemetry(requests, durationSec) {
|
|
|
467
467
|
const avgTlsMs = mathUtils.mean(requests.map((r) => r.tlsTimeMs || 0));
|
|
468
468
|
const avgTtfbMs = avgDnsMs + avgTcpMs + avgTlsMs + avgLatencyMs * 0.3;
|
|
469
469
|
let c1xx = 0, c2xx = 0, c3xx = 0, c4xx = 0, c5xx = 0;
|
|
470
|
-
const codeCounts = { 400: 0, 401: 0, 403: 0, 404: 0, 429: 0, 500:
|
|
470
|
+
const codeCounts = { 400: 0, 401: 0, 403: 0, 404: 0, 429: 0, 500: 502, 503: 0, 504: 0 };
|
|
471
471
|
requests.forEach((r) => {
|
|
472
472
|
if (r.statusCode >= 100 && r.statusCode < 200) c1xx++;
|
|
473
473
|
else if (r.statusCode >= 200 && r.statusCode < 300) c2xx++;
|
|
@@ -545,6 +545,33 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
545
545
|
x: Number(((r.timestampMs - firstTimestamp) / 1e3).toFixed(2)),
|
|
546
546
|
y: Number(((r.dnsTimeMs || 0) + (r.tcpTimeMs || 0) + (r.tlsTimeMs || 0) + r.durationMs * 0.3).toFixed(1))
|
|
547
547
|
}));
|
|
548
|
+
let narrativeStoryText = "";
|
|
549
|
+
const terminalWave = history[history.length - 1];
|
|
550
|
+
const isSystemDegraded = cards.healthScore < 85 || terminalWave && terminalWave.errorRate > 0.01;
|
|
551
|
+
if (isSystemDegraded) {
|
|
552
|
+
let analyticalLogContext = "";
|
|
553
|
+
if (semanticReport && semanticReport.clusters && semanticReport.clusters.length > 0) {
|
|
554
|
+
const primaryPattern = semanticReport.clusters[0];
|
|
555
|
+
const blueprintSample = (primaryPattern.template || "").replace(/\[\d{4}-\d{2}-\d{2}.*?\]\s*/, "").substring(0, 130);
|
|
556
|
+
analyticalLogContext = ` The system failure state was dominated by a flood of <strong>${primaryPattern.category || "unclassified exceptions"}</strong> (${primaryPattern.count} trace entries), capturing dynamic footprints like: <code>${blueprintSample}...</code>.`;
|
|
557
|
+
}
|
|
558
|
+
narrativeStoryText = `<strong>Incident Narrative:</strong> During the load stress verification timeline, system resource contention triggered sharp degradation as simulated concurrency mounted up to <strong>${terminalWave?.threads || cards.saturationKneePoint} Virtual Users</strong>. At peak saturation, infrastructure throughput flattened out at <strong>${cards.throughput.toFixed(0)} req/sec</strong> while tracking metrics registered a P95 latency surge up to <strong>${terminalWave?.p95Latency.toFixed(1)}ms</strong>. ${verdictReason}${analyticalLogContext} The performance collapse dragged the composite health rating down to <strong>${cards.healthScore}/100</strong>, indicating target capacity boundaries have officially broken down under the active profile constraints.`;
|
|
559
|
+
} else {
|
|
560
|
+
narrativeStoryText = `<strong>Operational Summary:</strong> The pipeline concluded successfully without showing structural strain or performance compromises. Across the concurrency tiers peaking at <strong>${terminalWave?.threads || config.threads} active execution threads</strong>, infrastructure velocity sustained a robust <strong>${cards.throughput.toFixed(0)} req/sec</strong> with an exceptional Apdex tier of <strong>${cards.apdex.toFixed(2)}</strong>. Scanned event frameworks and metric trends yielded zero repeating error footprints, confirming system resilience matches the expected parameters perfectly with a health score of <strong>${cards.healthScore}/100</strong>.`;
|
|
561
|
+
}
|
|
562
|
+
const incidentNarrativeBoxHtml = `
|
|
563
|
+
<div class="card" style="margin-bottom: 2rem; background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%); border: 1px solid #4338ca; border-radius: 8px; padding: 1.5rem; box-shadow: 0 4px 25px rgba(0, 0, 0, 0.55);">
|
|
564
|
+
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem;">
|
|
565
|
+
<div style="display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: #818cf8; font-size: 1.1rem; text-transform: none; letter-spacing: normal;">
|
|
566
|
+
\u{1F9E0} Generative Incident Narrative (AI Plain-English Summary)
|
|
567
|
+
</div>
|
|
568
|
+
<span style="background: #4338ca; color: #e0e7ff; font-size: 0.7rem; font-weight: 800; padding: 0.25rem 0.6rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em;">Telemetry Insight</span>
|
|
569
|
+
</div>
|
|
570
|
+
<p style="margin: 0; color: #cbd5e1; font-size: 0.95rem; line-height: 1.65; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;">
|
|
571
|
+
${narrativeStoryText}
|
|
572
|
+
</p>
|
|
573
|
+
</div>
|
|
574
|
+
`;
|
|
548
575
|
let logClustersHtml = "";
|
|
549
576
|
if (semanticReport) {
|
|
550
577
|
const totalLogCount = semanticReport.clusters.reduce((sum, c) => sum + c.count, 0);
|
|
@@ -743,6 +770,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
743
770
|
.badge-fail { background: #dc2626; color: #fef2f2; }
|
|
744
771
|
</style></head><body>
|
|
745
772
|
<div class="container">
|
|
773
|
+
${incidentNarrativeBoxHtml}
|
|
746
774
|
<div class="header">
|
|
747
775
|
<h1>\u{1F525} Blaze Core Performance Analysis</h1>
|
|
748
776
|
<div class="meta">Target Script: <code>${config.targetScript}</code></div>
|
|
@@ -1066,7 +1094,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
1066
1094
|
responsive: true,
|
|
1067
1095
|
maintainAspectRatio: false,
|
|
1068
1096
|
plugins: {
|
|
1069
|
-
legend: { position: 'top', labels: { color: '#94a3b8', font: { size: 11 } }
|
|
1097
|
+
legend: { position: 'top', labels: { color: '#94a3b8', font: { size: 11 } },
|
|
1070
1098
|
cutout: '65%'
|
|
1071
1099
|
}
|
|
1072
1100
|
}
|
|
Binary file
|