blaze-performance-tester 3.1.18 → 3.1.20

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 CHANGED
@@ -139,6 +139,7 @@ function parseArguments(args) {
139
139
  const targetScript = path.resolve(args[0] || ".");
140
140
  const isAgentic = args.includes("--agentic");
141
141
  const isCorrelate = args.includes("--correlate");
142
+ const isSeo = args.includes("--seo");
142
143
  const clusterLogs = !args.includes("--no-cluster-logs");
143
144
  let threads = 10;
144
145
  let durationSec = 10;
@@ -181,6 +182,7 @@ function parseArguments(args) {
181
182
  targetScript,
182
183
  isAgentic,
183
184
  isCorrelate,
185
+ isSeo,
184
186
  clusterLogs,
185
187
  threads,
186
188
  durationSec,
@@ -213,6 +215,31 @@ async function runBlazeCoreEngine(config) {
213
215
  }, 1e3);
214
216
  });
215
217
  }
218
+ function calculateSeoImpactMetrics(avgLatencyMs) {
219
+ const baseLineOptimalMs = 200;
220
+ if (avgLatencyMs <= baseLineOptimalMs) {
221
+ return { trafficLoss: 0, status: "Excellent", crawlPenalty: "None", color: "#10b981" };
222
+ }
223
+ const delayFactor = avgLatencyMs - baseLineOptimalMs;
224
+ const trafficLoss = Math.min(94, Math.floor(delayFactor / 1200 * 100));
225
+ let status = "Healthy";
226
+ let crawlPenalty = "Minimal impact on indexing rates.";
227
+ let color = "#10b981";
228
+ if (trafficLoss >= 50) {
229
+ status = "Critical Exposure";
230
+ crawlPenalty = "Severe penalty. Googlebot will heavily restrict crawl budgets due to timeout risks.";
231
+ color = "#ef4444";
232
+ } else if (trafficLoss >= 20) {
233
+ status = "Moderate Danger";
234
+ crawlPenalty = "Delayed indexation. Core Web Vital thresholds are officially breached.";
235
+ color = "#f97316";
236
+ } else if (trafficLoss > 5) {
237
+ status = "Minor Impact";
238
+ crawlPenalty = "Slightly elevated bounce trends could impact highly volatile rankings.";
239
+ color = "#eab308";
240
+ }
241
+ return { trafficLoss, status, crawlPenalty, color };
242
+ }
216
243
  async function runIntelligentAgenticStressTest(config) {
217
244
  console.log("\u{1F680} Initializing Intelligent Autonomous Load Agent...");
218
245
  const history = [];
@@ -305,6 +332,11 @@ async function runIntelligentAgenticStressTest(config) {
305
332
  saturationKneePoint: saturationKneePoint || history[history.length - 1]?.threads || 50
306
333
  };
307
334
  generateFinalAgentReport(history);
335
+ if (config.isSeo) {
336
+ const finalLat = history[history.length - 1]?.avgLatency || finalSummaryCards.ttfb;
337
+ const seo = calculateSeoImpactMetrics(finalLat);
338
+ console.log(`\u{1F50E} [SEO Impact Report]: Target latency under stress (${finalLat.toFixed(1)}ms) triggers a predicted Search Visibility Loss of -${seo.trafficLoss}% [Status: ${seo.status}].`);
339
+ }
308
340
  exportHtmlDashboard(history, config, verdictReason, semanticReport, { total1xx, total2xx, total3xx, total4xx, total5xx }, finalSummaryCards, lastRawRequests);
309
341
  }
310
342
  async function runStandardStressTest(config) {
@@ -341,6 +373,10 @@ async function runStandardStressTest(config) {
341
373
  };
342
374
  const isPassed = metrics.apdexScore >= config.targetApdex && metrics.errorRate <= config.targetErrorRate;
343
375
  const verdictReason = isPassed ? "Static single-wave baseline checks concluded successfully without triggering health boundaries." : "Static verification loop completed with values exceeding defined quality thresholds.";
376
+ if (config.isSeo) {
377
+ const seo = calculateSeoImpactMetrics(metrics.avgLatencyMs);
378
+ console.log(`\u{1F50E} [SEO Impact Report]: Target latency (${metrics.avgLatencyMs.toFixed(1)}ms) triggers a predicted Search Visibility Loss of -${seo.trafficLoss}% [Status: ${seo.status}].`);
379
+ }
344
380
  exportHtmlDashboard(history, config, verdictReason, semanticReport, {
345
381
  total1xx: metrics.c1xx,
346
382
  total2xx: metrics.c2xx,
@@ -525,6 +561,38 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
525
561
  </table>
526
562
  </div>`;
527
563
  }
564
+ let seoImpactSectionHtml = "";
565
+ if (config.isSeo) {
566
+ const finalLatency = history[history.length - 1]?.avgLatency || cards.ttfb;
567
+ const seoMetrics = calculateSeoImpactMetrics(finalLatency);
568
+ seoImpactSectionHtml = `
569
+ <div class="card" style="margin-top: 2rem; background: #111a2e; border: 1px solid #1e3a8a;">
570
+ <h3 style="color: #f43f5e; display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; border-bottom: 1px solid #1e293b; padding-bottom: 0.5rem;">
571
+ \u{1F50E} SEO Rank Impact & Visibility Loss Predictor
572
+ </h3>
573
+ <p style="color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.5rem;">
574
+ Translates response time infrastructure load stress into Core Web Vitals ranking drops and organic search volume degradation metrics.
575
+ </p>
576
+ <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;">
577
+ <div style="background: #090d16; padding: 1.25rem; border-radius: 6px; border: 1px solid #1e293b; text-align: center;">
578
+ <div class="card-title" style="color: #94a3b8;">Est. Organic Traffic Loss</div>
579
+ <div style="font-size: 2rem; font-weight: bold; color: ${seoMetrics.color};">
580
+ ${seoMetrics.trafficLoss > 0 ? "-" : ""}${seoMetrics.trafficLoss}%
581
+ </div>
582
+ <div style="font-size: 0.8rem; color: #64748b; margin-top: 0.25rem;">compared to 200ms sweet-spot</div>
583
+ </div>
584
+ <div style="background: #090d16; padding: 1.25rem; border-radius: 6px; border: 1px solid #1e293b;">
585
+ <div class="card-title">Search Visibility Status</div>
586
+ <div style="font-size: 1.25rem; font-weight: bold; color: ${seoMetrics.color}; margin-top: 0.4rem;">${seoMetrics.status}</div>
587
+ <div style="font-size: 0.8rem; color: #94a3b8; margin-top: 0.25rem;">Target Latency: ${finalLatency.toFixed(1)}ms</div>
588
+ </div>
589
+ <div style="background: #090d16; padding: 1.25rem; border-radius: 6px; border: 1px solid #1e293b;">
590
+ <div class="card-title">Googlebot Crawl Budget Impact</div>
591
+ <div style="font-size: 0.85rem; color: #e2e8f0; line-height: 1.5; margin-top: 0.4rem;">${seoMetrics.crawlPenalty}</div>
592
+ </div>
593
+ </div>
594
+ </div>`;
595
+ }
528
596
  const liveAdjusterHtml = `
529
597
  <div class="card" style="margin-top: 2rem; background: #131c2e; border: 1px solid #1e293b;">
530
598
  <h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; margin-bottom: 1rem;">
@@ -554,7 +622,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
554
622
  <h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem;">
555
623
  \u2601\uFE0F Infrastructure Right-Sizing & Cloud Cost Projections
556
624
  </h3>
557
- <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem;">
625
+ <div style="grid-template-columns: repeat(3, 1fr); display: grid; gap: 1rem; margin-top: 1rem;">
558
626
  <div style="background: #090d16; padding: 1rem; border-radius: 6px; border: 1px solid #1e293b;">
559
627
  <div class="card-title">Est. Monthly Cloud Cost</div>
560
628
  <div class="card-value green">$${estimatedMonthlyCost} <span class="unit">/mo</span></div>
@@ -754,6 +822,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
754
822
  </tbody>
755
823
  </table>
756
824
  </div>
825
+ ${seoImpactSectionHtml}
757
826
  ${liveAdjusterHtml}
758
827
  ${rightSizingHtml}
759
828
  ${logClustersHtml}
@@ -910,6 +979,6 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
910
979
  function printUsage() {
911
980
  console.log(`Blaze Core Performance Test CLI Engine
912
981
  Options:
913
- --threads <count> | --duration <seconds> | --agentic | --cluster-logs | --correlate`);
982
+ --threads <count> | --duration <seconds> | --agentic | --cluster-logs | --correlate | --seo`);
914
983
  }
915
984
  main().catch(console.error);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "3.1.18",
3
+ "version": "3.1.20",
4
4
  "description": "A high-performance, multi-threaded load testing engine built with Rust and QuickJS.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",