blaze-performance-tester 3.1.23 → 3.1.24
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 +54 -58
- 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:
|
|
470
|
+
const codeCounts = { 400: 0, 401: 0, 403: 0, 404: 429, 429: 0, 500: 0, 502: 0, 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++;
|
|
@@ -640,26 +640,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
640
640
|
</div>
|
|
641
641
|
</div>
|
|
642
642
|
</div>`;
|
|
643
|
-
const rightSizingHtml = `
|
|
644
|
-
<div class="card p-devops p-exec" style="margin-top: 2rem; background: #131c2e; border: 1px solid #1e293b;">
|
|
645
|
-
<h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem;">
|
|
646
|
-
\u2601\uFE0F Infrastructure Right-Sizing & Cloud Cost Projections
|
|
647
|
-
</h3>
|
|
648
|
-
<div style="grid-template-columns: repeat(3, 1fr); display: grid; gap: 1rem; margin-top: 1rem;">
|
|
649
|
-
<div style="background: #090d16; padding: 1rem; border-radius: 6px; border: 1px solid #1e293b;">
|
|
650
|
-
<div class="card-title">Est. Monthly Cloud Cost</div>
|
|
651
|
-
<div class="card-value green">$${estimatedMonthlyCost} <span class="unit">/mo</span></div>
|
|
652
|
-
</div>
|
|
653
|
-
<div style="background: #090d16; padding: 1rem; border-radius: 6px; border: 1px solid #1e293b;">
|
|
654
|
-
<div class="card-title">Recommended CPU Right-Sizing</div>
|
|
655
|
-
<div class="card-value purple">${recommendedCpuCores} <span class="unit">vCores</span></div>
|
|
656
|
-
</div>
|
|
657
|
-
<div style="background: #090d16; padding: 1rem; border-radius: 6px; border: 1px solid #1e293b;">
|
|
658
|
-
<div class="card-title">Recommended Memory Allocation</div>
|
|
659
|
-
<div class="card-value orange">${recommendedRamGb} <span class="unit">GB RAM</span></div>
|
|
660
|
-
</div>
|
|
661
|
-
</div>
|
|
662
|
-
</div>`;
|
|
663
643
|
const breakdownRates = responseMatrix.breakdownRates || {};
|
|
664
644
|
const breakdownGridHtml = [400, 401, 403, 404, 429, 500, 502, 503, 504].map((code) => {
|
|
665
645
|
const rate = breakdownRates[code] || 0;
|
|
@@ -708,7 +688,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
708
688
|
.gauge-container-box { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
|
709
689
|
.gauge-title { font-size: 0.85rem; font-weight: bold; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
|
|
710
690
|
|
|
711
|
-
.matrix-box { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.25rem; }
|
|
691
|
+
.matrix-box { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; }
|
|
712
692
|
.matrix-title { font-size: 1.1rem; font-weight: bold; color: #ffffff; margin-bottom: 1rem; }
|
|
713
693
|
.matrix-box .matrix-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #1e293b; }
|
|
714
694
|
.matrix-box .matrix-row:last-child { border-bottom: none; }
|
|
@@ -741,12 +721,12 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
741
721
|
<div class="meta">Target Script: <code>${config.targetScript}</code></div>
|
|
742
722
|
</div>
|
|
743
723
|
|
|
744
|
-
<!--
|
|
724
|
+
<!-- Persona View Switcher Selector Elements -->
|
|
745
725
|
<div class="persona-toggle-container">
|
|
746
726
|
<span style="font-size: 0.8rem; color: #64748b; font-weight: bold; text-transform: uppercase;">View Perspective:</span>
|
|
747
|
-
<button class="persona-btn active" onclick="switchPersona('developer')">Developer</button>
|
|
748
|
-
<button class="persona-btn" onclick="switchPersona('devops')">DevOps</button>
|
|
749
|
-
<button class="persona-btn" onclick="switchPersona('executive')">Executive</button>
|
|
727
|
+
<button class="persona-btn active" onclick="switchPersona('developer', this)">Developer</button>
|
|
728
|
+
<button class="persona-btn" onclick="switchPersona('devops', this)">DevOps</button>
|
|
729
|
+
<button class="persona-btn" onclick="switchPersona('executive', this)">Executive</button>
|
|
750
730
|
</div>
|
|
751
731
|
</div>
|
|
752
732
|
|
|
@@ -809,25 +789,29 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
809
789
|
</div>
|
|
810
790
|
|
|
811
791
|
<div class="matrix-box p-devops p-dev">
|
|
812
|
-
<div
|
|
813
|
-
|
|
814
|
-
<div class="matrix-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
<div class="matrix-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
<div class="matrix-
|
|
823
|
-
|
|
792
|
+
<div>
|
|
793
|
+
<div class="matrix-title">\u{1F4CB} HTTP Response Matrix</div>
|
|
794
|
+
<div class="matrix-row">
|
|
795
|
+
<div class="matrix-label">Successful <span class="matrix-badge badge-2xx">2xx</span></div>
|
|
796
|
+
<div class="matrix-value">${responseMatrix.total2xx}</div>
|
|
797
|
+
</div>
|
|
798
|
+
<div class="matrix-row">
|
|
799
|
+
<div class="matrix-label">Client Error <span class="matrix-badge badge-4xx">4xx</span></div>
|
|
800
|
+
<div class="matrix-value">${responseMatrix.total4xx}</div>
|
|
801
|
+
</div>
|
|
802
|
+
<div class="matrix-row">
|
|
803
|
+
<div class="matrix-label">Server Error <span class="matrix-badge badge-5xx">5xx</span></div>
|
|
804
|
+
<div class="matrix-value">${responseMatrix.total5xx}</div>
|
|
805
|
+
</div>
|
|
824
806
|
</div>
|
|
825
807
|
|
|
826
|
-
<div
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
808
|
+
<div>
|
|
809
|
+
<div class="matrix-title" style="margin-top: 1.5rem; font-size: 0.85rem; border-top: 1px solid #1e293b; padding-top: 1rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em;">
|
|
810
|
+
\u{1F522} HTTP Status Code Breakdown Rate
|
|
811
|
+
</div>
|
|
812
|
+
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.5rem;">
|
|
813
|
+
${breakdownGridHtml}
|
|
814
|
+
</div>
|
|
831
815
|
</div>
|
|
832
816
|
</div>
|
|
833
817
|
</div>
|
|
@@ -911,26 +895,38 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
911
895
|
});
|
|
912
896
|
}
|
|
913
897
|
|
|
914
|
-
//
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
898
|
+
// Global register tracking charts for explicit redraw logic execution
|
|
899
|
+
const activeCharts = [];
|
|
900
|
+
|
|
901
|
+
function switchPersona(persona, targetBtn) {
|
|
902
|
+
if (targetBtn) {
|
|
903
|
+
document.querySelectorAll('.persona-btn').forEach(btn => btn.classList.remove('active'));
|
|
904
|
+
targetBtn.classList.add('active');
|
|
905
|
+
}
|
|
918
906
|
|
|
919
|
-
// Hide all dynamic
|
|
907
|
+
// Hide all dynamic viewport configurations
|
|
920
908
|
const layouts = ['.p-dev', '.p-devops', '.p-exec'];
|
|
921
909
|
layouts.forEach(selector => {
|
|
922
910
|
document.querySelectorAll(selector).forEach(el => el.style.display = 'none');
|
|
923
911
|
});
|
|
924
912
|
|
|
925
|
-
//
|
|
913
|
+
// Target current selector views for block visibility execution
|
|
926
914
|
document.querySelectorAll('.p-' + persona).forEach(el => {
|
|
927
915
|
if (el.tagName === 'TR') el.style.display = 'table-row';
|
|
928
916
|
else if (el.classList.contains('metric-card')) el.style.display = 'block';
|
|
929
917
|
else el.style.display = '';
|
|
930
918
|
});
|
|
919
|
+
|
|
920
|
+
// AUTO-REFRESH IMPLEMENTATION: Triggers sizing layout re-calculations on unhidden canvases
|
|
921
|
+
activeCharts.forEach(chart => {
|
|
922
|
+
if (chart) {
|
|
923
|
+
chart.resize();
|
|
924
|
+
chart.update('active');
|
|
925
|
+
}
|
|
926
|
+
});
|
|
931
927
|
}
|
|
932
928
|
|
|
933
|
-
new Chart(document.getElementById('volumeChart'), {
|
|
929
|
+
activeCharts.push(new Chart(document.getElementById('volumeChart'), {
|
|
934
930
|
type: 'bar',
|
|
935
931
|
data: {
|
|
936
932
|
labels: labels,
|
|
@@ -940,9 +936,9 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
940
936
|
]
|
|
941
937
|
},
|
|
942
938
|
options: { responsive: true, maintainAspectRatio: false, scales: { x: { grid: { color: '#1e293b' } }, y: { stacked: true, grid: { color: '#1e293b' } } } }
|
|
943
|
-
});
|
|
939
|
+
}));
|
|
944
940
|
|
|
945
|
-
new Chart(document.getElementById('concurrencyChart'), {
|
|
941
|
+
activeCharts.push(new Chart(document.getElementById('concurrencyChart'), {
|
|
946
942
|
type: 'line',
|
|
947
943
|
data: {
|
|
948
944
|
labels: labels,
|
|
@@ -952,24 +948,24 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
952
948
|
]
|
|
953
949
|
},
|
|
954
950
|
options: { responsive: true, maintainAspectRatio: false }
|
|
955
|
-
});
|
|
951
|
+
}));
|
|
956
952
|
|
|
957
|
-
new Chart(document.getElementById('statusDonutChart'), {
|
|
953
|
+
activeCharts.push(new Chart(document.getElementById('statusDonutChart'), {
|
|
958
954
|
type: 'doughnut',
|
|
959
955
|
data: {
|
|
960
956
|
labels: ['Success', 'Client Err', 'Server Err'],
|
|
961
957
|
datasets: [{ data: [${responseMatrix.total2xx}, ${responseMatrix.total4xx}, ${responseMatrix.total5xx}], backgroundColor: ['#4ade80', '#fde047', '#f87171'] }]
|
|
962
958
|
},
|
|
963
959
|
options: { responsive: true, maintainAspectRatio: false }
|
|
964
|
-
});
|
|
960
|
+
}));
|
|
965
961
|
|
|
966
|
-
new Chart(document.getElementById('ttfbScatterChart'), {
|
|
962
|
+
activeCharts.push(new Chart(document.getElementById('ttfbScatterChart'), {
|
|
967
963
|
type: 'scatter',
|
|
968
964
|
data: { datasets: [{ label: 'Processing Delay', data: ${JSON.stringify(scatterPoints)}, backgroundColor: '#a855f7' }] },
|
|
969
965
|
options: { responsive: true, maintainAspectRatio: false }
|
|
970
|
-
});
|
|
966
|
+
}));
|
|
971
967
|
|
|
972
|
-
//
|
|
968
|
+
// Bootstrapped configuration state defaults dashboard load view to Developer
|
|
973
969
|
document.querySelectorAll('.p-devops, .p-exec').forEach(el => el.style.display = 'none');
|
|
974
970
|
document.querySelectorAll('.p-dev').forEach(el => el.style.display = '');
|
|
975
971
|
</script></body></html>`;
|
|
Binary file
|