blaze-performance-tester 3.1.10 → 3.1.11
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 +11 -35
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -85,9 +85,7 @@ var mathUtils = {
|
|
|
85
85
|
const sorted = [...arr].sort((a, b) => a - b);
|
|
86
86
|
const index = Math.ceil(p / 100 * sorted.length) - 1;
|
|
87
87
|
return sorted[Math.max(0, index)];
|
|
88
|
-
}
|
|
89
|
-
min: (arr) => arr.length === 0 ? 0 : arr.reduce((min, val) => val < min ? val : min, arr[0]),
|
|
90
|
-
max: (arr) => arr.length === 0 ? 0 : arr.reduce((max, val) => val > max ? val : max, arr[0])
|
|
88
|
+
}
|
|
91
89
|
};
|
|
92
90
|
async function executeTestPipeline(config) {
|
|
93
91
|
if (!blazeCore || typeof blazeCore.runCorrelatedTransaction !== "function") {
|
|
@@ -264,8 +262,6 @@ async function runIntelligentAgenticStressTest(config) {
|
|
|
264
262
|
threads: currentThreads,
|
|
265
263
|
avgLatency: metrics.avgLatencyMs,
|
|
266
264
|
p95Latency: metrics.p95LatencyMs,
|
|
267
|
-
minLatency: metrics.minLatencyMs,
|
|
268
|
-
maxLatency: metrics.maxLatencyMs,
|
|
269
265
|
errorRate: metrics.errorRate,
|
|
270
266
|
apdex: metrics.apdexScore,
|
|
271
267
|
throughput: metrics.requestsPerSecond,
|
|
@@ -341,9 +337,7 @@ async function runIntelligentAgenticStressTest(config) {
|
|
|
341
337
|
cls: mathUtils.mean(globalMetricsAccumulator.cls),
|
|
342
338
|
econnresetRate: totalGlobalRequests === 0 ? 0 : totalEconnreset / totalGlobalRequests * 100,
|
|
343
339
|
econnrefusedCount: totalEconnrefused,
|
|
344
|
-
codeRates: aggregatedCodeRates
|
|
345
|
-
minLatency: history.length === 0 ? 0 : Math.min(...history.map((h) => h.minLatency)),
|
|
346
|
-
maxLatency: history.length === 0 ? 0 : Math.max(...history.map((h) => h.maxLatency))
|
|
340
|
+
codeRates: aggregatedCodeRates
|
|
347
341
|
};
|
|
348
342
|
generateFinalAgentReport(history);
|
|
349
343
|
exportHtmlDashboard(history, config, verdictReason, semanticReport, { total1xx, total2xx, total3xx, total4xx, total5xx }, finalSummaryCards, lastRawRequests);
|
|
@@ -356,8 +350,6 @@ async function runStandardStressTest(config) {
|
|
|
356
350
|
threads: config.threads,
|
|
357
351
|
avgLatency: metrics.avgLatencyMs,
|
|
358
352
|
p95Latency: metrics.p95LatencyMs,
|
|
359
|
-
minLatency: metrics.minLatencyMs,
|
|
360
|
-
maxLatency: metrics.maxLatencyMs,
|
|
361
353
|
errorRate: metrics.errorRate,
|
|
362
354
|
apdex: metrics.apdexScore,
|
|
363
355
|
throughput: metrics.requestsPerSecond,
|
|
@@ -393,9 +385,7 @@ async function runStandardStressTest(config) {
|
|
|
393
385
|
cls: metrics.clsScore,
|
|
394
386
|
econnresetRate: metrics.econnresetRate,
|
|
395
387
|
econnrefusedCount: metrics.econnrefusedCount,
|
|
396
|
-
codeRates: metrics.codeRates
|
|
397
|
-
minLatency: metrics.minLatencyMs,
|
|
398
|
-
maxLatency: metrics.maxLatencyMs
|
|
388
|
+
codeRates: metrics.codeRates
|
|
399
389
|
};
|
|
400
390
|
const isPassed = metrics.apdexScore >= config.targetApdex && metrics.errorRate <= config.targetErrorRate;
|
|
401
391
|
const verdictReason = isPassed ? "Static single-wave baseline checks concluded successfully without triggering health boundaries." : "Static verification loop completed with values exceeding defined quality thresholds.";
|
|
@@ -449,7 +439,7 @@ function generateSimulationData(threads, durationSec, maxAllowedLatencyMs) {
|
|
|
449
439
|
if (Math.random() < 0.03) statusCode = 302;
|
|
450
440
|
}
|
|
451
441
|
data.push({
|
|
452
|
-
durationMs: isError ? baseLatency * 0.1
|
|
442
|
+
durationMs: isError ? baseLatency * 0.1 : baseLatency,
|
|
453
443
|
timestampMs: startTime + Math.random() * (durationSec * 1e3),
|
|
454
444
|
dnsTimeMs: 1 + Math.random() * 0.9,
|
|
455
445
|
tcpTimeMs: 4 + Math.random() * 1.5,
|
|
@@ -466,8 +456,6 @@ function processMetricsTelemetry(requests, durationSec, apdexT) {
|
|
|
466
456
|
const avgLatencyMs = mathUtils.mean(durations);
|
|
467
457
|
const stdDevMs = mathUtils.stdDev(durations, avgLatencyMs);
|
|
468
458
|
const p95LatencyMs = mathUtils.percentile(durations, 95);
|
|
469
|
-
const minLatencyMs = mathUtils.min(durations);
|
|
470
|
-
const maxLatencyMs = mathUtils.max(durations);
|
|
471
459
|
const avgDnsMs = mathUtils.mean(requests.map((r) => r.dnsTimeMs || 0));
|
|
472
460
|
const avgTcpMs = mathUtils.mean(requests.map((r) => r.tcpTimeMs || 0));
|
|
473
461
|
const avgTlsMs = mathUtils.mean(requests.map((r) => r.tlsTimeMs || 0));
|
|
@@ -511,8 +499,6 @@ function processMetricsTelemetry(requests, durationSec, apdexT) {
|
|
|
511
499
|
avgLatencyMs,
|
|
512
500
|
stdDevMs,
|
|
513
501
|
p95LatencyMs,
|
|
514
|
-
minLatencyMs,
|
|
515
|
-
maxLatencyMs,
|
|
516
502
|
errorRate,
|
|
517
503
|
apdexScore,
|
|
518
504
|
c1xx,
|
|
@@ -542,7 +528,7 @@ function printMatrixDashboard(m, threads) {
|
|
|
542
528
|
console.log(`-----------------------------------------------------------------------------------------`);
|
|
543
529
|
console.log(`| ${pad(threads, 7)} | ${pad(m.totalRequests, 9)} | ${pad(m.avgLatencyMs.toFixed(1) + "ms", 11)} | ${pad(m.p95LatencyMs.toFixed(1) + "ms", 11)} | ${pad(m.requestsPerSecond.toFixed(0) + "/s", 10)} | ${pad((m.errorRate * 100).toFixed(2) + "%", 10)} | ${pad(m.apdexScore.toFixed(2), 9)} |`);
|
|
544
530
|
console.log(`-----------------------------------------------------------------------------------------`);
|
|
545
|
-
console.log(`| Network
|
|
531
|
+
console.log(`| Network State -> RESET Rate: ${m.econnresetRate.toFixed(2)}% | REFUSED Count: ${m.econnrefusedCount} | Web Vitals -> LCP: ${m.lcpMs.toFixed(0)}ms |`);
|
|
546
532
|
console.log(`-----------------------------------------------------------------------------------------`);
|
|
547
533
|
}
|
|
548
534
|
function generateFinalAgentReport(history) {
|
|
@@ -565,7 +551,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
565
551
|
const activeThreadsData = history.map((h) => h.threads);
|
|
566
552
|
const ttfTrendData = history.map((h) => h.avgLatency * 1.1);
|
|
567
553
|
const waveListItems = history.map((h) => {
|
|
568
|
-
return `<div class="wave-item">Wave (${h.threads} VUs):
|
|
554
|
+
return `<div class="wave-item">Wave (${h.threads} VUs): P95 ${h.p95Latency.toFixed(1)}ms, ECONNRESET Rate: ${h.econnresetRate.toFixed(1)}%, REFUSED: ${h.econnrefusedCount}</div>`;
|
|
569
555
|
}).join("");
|
|
570
556
|
const estimatedMonthlyCost = (cards.throughput * 0.045 * 24 * 30).toFixed(2);
|
|
571
557
|
const recommendedCpuCores = Math.max(2, Math.ceil(cards.saturationKneePoint / 75));
|
|
@@ -758,8 +744,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
758
744
|
.meta { color: #94a3b8; font-size: 0.9rem; margin-top: 0.5rem; }
|
|
759
745
|
|
|
760
746
|
.section-title { font-size: 1.2rem; color: #cbd5e1; font-weight: bold; margin: 2rem 0 1rem 0; padding-bottom: 0.4rem; border-bottom: 1px solid #1e293b; }
|
|
761
|
-
.cards-wrapper { display: grid; grid-template-columns: repeat(
|
|
762
|
-
@media (max-width: 1024px) { .cards-wrapper { grid-template-columns: repeat(2, 1fr); } }
|
|
747
|
+
.cards-wrapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
|
|
763
748
|
.metric-card { background: #131c2e; border: 1px solid #1e293b; border-radius: 6px; padding: 1.25rem; position: relative; }
|
|
764
749
|
.card-title { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
|
|
765
750
|
.card-value { font-size: 1.6rem; font-weight: 700; color: #ffffff; }
|
|
@@ -768,7 +753,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
768
753
|
.card-value.orange { color: #f97316; }
|
|
769
754
|
.card-value.purple { color: #a855f7; }
|
|
770
755
|
.card-value.cyan { color: #38bdf8; }
|
|
771
|
-
.card-value.red { color: #f87171; }
|
|
772
756
|
.card-subtext { font-size: 0.8rem; font-weight: 500; margin-left: 0.4rem; display: inline-block; }
|
|
773
757
|
.card-subtext.green { color: #10b981; }
|
|
774
758
|
.card-subtext.orange { color: #f97316; }
|
|
@@ -816,20 +800,12 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
816
800
|
<div class="cards-wrapper">
|
|
817
801
|
<div class="metric-card">
|
|
818
802
|
<div class="card-title">Apdex Score (T: ${config.apdexT}ms)</div>
|
|
819
|
-
<div class="card-value green">${cards.apdex.toFixed(2)}<span class="card-subtext green">(Verified)</span></div>
|
|
803
|
+
<div class="card-value green">${cards.apdex.toFixed(2)}<span class="card-subtext green">(Target Verified)</span></div>
|
|
820
804
|
</div>
|
|
821
805
|
<div class="metric-card">
|
|
822
806
|
<div class="card-title">Throughput</div>
|
|
823
807
|
<div class="card-value orange">${cards.throughput.toFixed(1)}<span class="unit">/s</span></div>
|
|
824
808
|
</div>
|
|
825
|
-
<div class="metric-card">
|
|
826
|
-
<div class="card-title">Minimum Response Time</div>
|
|
827
|
-
<div class="card-value green">${cards.minLatency.toFixed(1)}<span class="unit">ms</span></div>
|
|
828
|
-
</div>
|
|
829
|
-
<div class="metric-card">
|
|
830
|
-
<div class="card-title">Maximum Response Time</div>
|
|
831
|
-
<div class="card-value red">${cards.maxLatency.toFixed(1)}<span class="unit">ms</span></div>
|
|
832
|
-
</div>
|
|
833
809
|
<div class="metric-card">
|
|
834
810
|
<div class="card-title">Network Bandwidth</div>
|
|
835
811
|
<div class="card-value purple">${cards.bandwidth.toFixed(2)}<span class="unit">MB/s</span></div>
|
|
@@ -936,8 +912,8 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
936
912
|
<th>Throughput</th>
|
|
937
913
|
<th>Avg Latency</th>
|
|
938
914
|
<th>P95 Latency</th>
|
|
939
|
-
<th>
|
|
940
|
-
<th>
|
|
915
|
+
<th>ECONNRESET Rate</th>
|
|
916
|
+
<th>ECONNREFUSED</th>
|
|
941
917
|
<th>Status</th>
|
|
942
918
|
</tr>
|
|
943
919
|
</thead>
|
|
@@ -949,8 +925,8 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
949
925
|
<td>${h.throughput.toFixed(0)} req/sec</td>
|
|
950
926
|
<td>${h.avgLatency.toFixed(1)} ms</td>
|
|
951
927
|
<td>${h.p95Latency.toFixed(1)} ms</td>
|
|
952
|
-
<td><small>${h.minLatency.toFixed(1)}ms / ${h.maxLatency.toFixed(1)}ms</small></td>
|
|
953
928
|
<td>${h.econnresetRate.toFixed(2)}%</td>
|
|
929
|
+
<td>${h.econnrefusedCount} nodes</td>
|
|
954
930
|
<td><span class="badge ${isPassed ? "badge-success" : "badge-fail"}">${isPassed ? "SLO PASS" : "SLO BREACH"}</span></td>
|
|
955
931
|
</tr>`;
|
|
956
932
|
}).join("")}
|
|
Binary file
|