blaze-performance-tester 3.2.20 → 3.2.23
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 +88 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5613,6 +5613,37 @@ function loadBaselineData(filePath) {
|
|
|
5613
5613
|
}
|
|
5614
5614
|
return null;
|
|
5615
5615
|
}
|
|
5616
|
+
function getCrossBrowserMatrixData() {
|
|
5617
|
+
return [
|
|
5618
|
+
{
|
|
5619
|
+
engine: "Chrome (Blink)",
|
|
5620
|
+
badgeClass: "badge-blink",
|
|
5621
|
+
fcp: "310 ms",
|
|
5622
|
+
lcp: "780 ms",
|
|
5623
|
+
journeyDuration: "3.8 s",
|
|
5624
|
+
status: "Optimal",
|
|
5625
|
+
statusClass: "status-optimal"
|
|
5626
|
+
},
|
|
5627
|
+
{
|
|
5628
|
+
engine: "Safari (WebKit)",
|
|
5629
|
+
badgeClass: "badge-webkit",
|
|
5630
|
+
fcp: "420 ms",
|
|
5631
|
+
lcp: "1050 ms",
|
|
5632
|
+
journeyDuration: "5.2 s",
|
|
5633
|
+
status: "Investigate",
|
|
5634
|
+
statusClass: "status-warning"
|
|
5635
|
+
},
|
|
5636
|
+
{
|
|
5637
|
+
engine: "Firefox (Gecko)",
|
|
5638
|
+
badgeClass: "badge-gecko",
|
|
5639
|
+
fcp: "370 ms",
|
|
5640
|
+
lcp: "910 ms",
|
|
5641
|
+
journeyDuration: "4.4 s",
|
|
5642
|
+
status: "Optimal",
|
|
5643
|
+
statusClass: "status-optimal"
|
|
5644
|
+
}
|
|
5645
|
+
];
|
|
5646
|
+
}
|
|
5616
5647
|
async function generateElifExplanation(metrics) {
|
|
5617
5648
|
const apiKey = process.env.GEMINI_API_KEY;
|
|
5618
5649
|
if (!apiKey) {
|
|
@@ -5784,6 +5815,15 @@ async function runCli() {
|
|
|
5784
5815
|
return;
|
|
5785
5816
|
}
|
|
5786
5817
|
const config = parseArguments(args);
|
|
5818
|
+
if (config.isCrossBrowser) {
|
|
5819
|
+
console.log(`
|
|
5820
|
+
\u{1F310} [Cross-Browser Performance Matrix Enabled]`);
|
|
5821
|
+
const matrix = getCrossBrowserMatrixData();
|
|
5822
|
+
matrix.forEach((m) => {
|
|
5823
|
+
console.log(`- ${m.engine}: FCP ${m.fcp}, LCP ${m.lcp}, Journey Duration ${m.journeyDuration} [Status: ${m.status}]`);
|
|
5824
|
+
});
|
|
5825
|
+
console.log();
|
|
5826
|
+
}
|
|
5787
5827
|
if (argv.prompt) {
|
|
5788
5828
|
const promptText = argv.prompt;
|
|
5789
5829
|
try {
|
|
@@ -5820,6 +5860,7 @@ function parseArguments(args) {
|
|
|
5820
5860
|
const isAgentic = args.includes("--agentic");
|
|
5821
5861
|
const isCorrelate = args.includes("--correlate");
|
|
5822
5862
|
const isSeo = args.includes("--seo");
|
|
5863
|
+
const isCrossBrowser = args.includes("--cross-browser");
|
|
5823
5864
|
const clusterLogs = !args.includes("--no-cluster-logs");
|
|
5824
5865
|
let threads = 10;
|
|
5825
5866
|
let durationSec = 10;
|
|
@@ -5891,6 +5932,8 @@ function parseArguments(args) {
|
|
|
5891
5932
|
isAgentic,
|
|
5892
5933
|
isCorrelate,
|
|
5893
5934
|
isSeo,
|
|
5935
|
+
isCrossBrowser,
|
|
5936
|
+
// Include in configuration object
|
|
5894
5937
|
clusterLogs,
|
|
5895
5938
|
threads,
|
|
5896
5939
|
durationSec,
|
|
@@ -5904,7 +5947,6 @@ function parseArguments(args) {
|
|
|
5904
5947
|
outputHtml,
|
|
5905
5948
|
baselinePath,
|
|
5906
5949
|
optionValue
|
|
5907
|
-
// Return optionValue in configuration object
|
|
5908
5950
|
};
|
|
5909
5951
|
}
|
|
5910
5952
|
async function runBlazeCoreEngine(config) {
|
|
@@ -6352,6 +6394,38 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
6352
6394
|
</div>
|
|
6353
6395
|
</div>`;
|
|
6354
6396
|
}
|
|
6397
|
+
const crossBrowserRows = getCrossBrowserMatrixData().map((m) => `
|
|
6398
|
+
<tr>
|
|
6399
|
+
<td><span class="engine-badge ${m.badgeClass}">${m.engine}</span></td>
|
|
6400
|
+
<td>${m.fcp}</td>
|
|
6401
|
+
<td>${m.lcp}</td>
|
|
6402
|
+
<td>${m.journeyDuration}</td>
|
|
6403
|
+
<td><span class="${m.statusClass}">${m.status}</span></td>
|
|
6404
|
+
</tr>
|
|
6405
|
+
`).join("");
|
|
6406
|
+
const crossBrowserMatrixSectionHtml = `
|
|
6407
|
+
<div class="card" style="margin-top: 2rem; background: #131c2e; border: 1px solid #38bdf8;">
|
|
6408
|
+
<h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; border-bottom: 1px solid #1e293b; padding-bottom: 0.5rem;">
|
|
6409
|
+
\u{1F310} Cross-Browser Rendering Performance Matrix
|
|
6410
|
+
</h3>
|
|
6411
|
+
<p style="color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.5rem;">
|
|
6412
|
+
Synthetic user journey benchmarks across Blink, WebKit, and Gecko execution contexts.
|
|
6413
|
+
</p>
|
|
6414
|
+
<table class="matrix-table" style="width: 100%; border-collapse: collapse; text-align: left; font-size: 14px;">
|
|
6415
|
+
<thead>
|
|
6416
|
+
<tr style="border-bottom: 1px solid #1e293b;">
|
|
6417
|
+
<th style="padding: 12px 14px; background: #090d16; color: #94a3b8; font-size: 12px; text-transform: uppercase;">Browser Engine</th>
|
|
6418
|
+
<th style="padding: 12px 14px; background: #090d16; color: #94a3b8; font-size: 12px; text-transform: uppercase;">FCP</th>
|
|
6419
|
+
<th style="padding: 12px 14px; background: #090d16; color: #94a3b8; font-size: 12px; text-transform: uppercase;">LCP</th>
|
|
6420
|
+
<th style="padding: 12px 14px; background: #090d16; color: #94a3b8; font-size: 12px; text-transform: uppercase;">Journey Duration</th>
|
|
6421
|
+
<th style="padding: 12px 14px; background: #090d16; color: #94a3b8; font-size: 12px; text-transform: uppercase;">Performance Status</th>
|
|
6422
|
+
</tr>
|
|
6423
|
+
</thead>
|
|
6424
|
+
<tbody>
|
|
6425
|
+
${crossBrowserRows}
|
|
6426
|
+
</tbody>
|
|
6427
|
+
</table>
|
|
6428
|
+
</div>`;
|
|
6355
6429
|
let logClustersHtml = "";
|
|
6356
6430
|
if (semanticReport) {
|
|
6357
6431
|
const totalLogCount = semanticReport.clusters.reduce((sum, c) => sum + c.count, 0);
|
|
@@ -6563,6 +6637,14 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
6563
6637
|
.badge-5xx { background: rgba(220, 38, 38, 0.2); color: #f87171; }
|
|
6564
6638
|
.matrix-value { font-size: 1rem; font-weight: bold; color: #ffffff; }
|
|
6565
6639
|
|
|
6640
|
+
/* Cross-browser engine badge utility styles */
|
|
6641
|
+
.engine-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: 12px; }
|
|
6642
|
+
.badge-blink { background: #dbeafe; color: #1e40af; }
|
|
6643
|
+
.badge-webkit { background: #fef3c7; color: #92400e; }
|
|
6644
|
+
.badge-gecko { background: #fee2e2; color: #991b1b; }
|
|
6645
|
+
.status-optimal { color: #16a34a; font-weight: 600; }
|
|
6646
|
+
.status-warning { color: #ca8a04; font-weight: 600; }
|
|
6647
|
+
|
|
6566
6648
|
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
|
|
6567
6649
|
.graph-card { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.5rem; }
|
|
6568
6650
|
.graph-title { font-size: 1.1rem; font-weight: 700; color: #ffffff; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
|
|
@@ -6618,8 +6700,9 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
6618
6700
|
</div>
|
|
6619
6701
|
|
|
6620
6702
|
${baselineComparisonHtml}
|
|
6703
|
+
${crossBrowserMatrixSectionHtml}
|
|
6621
6704
|
|
|
6622
|
-
<div class="top-layout-grid">
|
|
6705
|
+
<div class="top-layout-grid" style="margin-top: 2rem;">
|
|
6623
6706
|
<div class="verdict-box">
|
|
6624
6707
|
<div class="verdict-title">\u{1F916} AI Stress-Testing Agent Verdict</div>
|
|
6625
6708
|
<div class="verdict-text">${verdictReason}</div>
|
|
@@ -6677,7 +6760,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
6677
6760
|
</div>
|
|
6678
6761
|
</div>
|
|
6679
6762
|
|
|
6680
|
-
<div class="card" style="margin-
|
|
6763
|
+
<div class="card" style="margin-top: 2rem; background: #0c172b; border: 1px solid #7c3aed;">
|
|
6681
6764
|
<h3 style="color: #a78bfa; display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; border-bottom: 1px solid #1e293b; padding-bottom: 0.5rem;">
|
|
6682
6765
|
\u26A1 Gemini 2.5 Flash Autonomous Root Cause Analysis (RCA)
|
|
6683
6766
|
</h3>
|
|
@@ -6686,7 +6769,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
6686
6769
|
</div>
|
|
6687
6770
|
</div>
|
|
6688
6771
|
|
|
6689
|
-
<div class="charts-grid">
|
|
6772
|
+
<div class="charts-grid" style="margin-top: 2rem;">
|
|
6690
6773
|
<div class="graph-card">
|
|
6691
6774
|
<div class="graph-title">\u{1F4CA} Throughput Velocity & Workload Volume</div>
|
|
6692
6775
|
<div style="height: 280px; position: relative;">
|
|
@@ -7015,7 +7098,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
7015
7098
|
function printUsage() {
|
|
7016
7099
|
console.log(`Blaze Core Performance Test CLI Engine
|
|
7017
7100
|
Options:
|
|
7018
|
-
--threads <count> | --duration <seconds> | --baseline <json_file> | --output <html_file> | --option elif`);
|
|
7101
|
+
--threads <count> | --duration <seconds> | --baseline <json_file> | --output <html_file> | --cross-browser | --option elif`);
|
|
7019
7102
|
}
|
|
7020
7103
|
runCli().catch(console.error);
|
|
7021
7104
|
export {
|