blaze-performance-tester 3.0.32 → 3.0.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 CHANGED
@@ -514,6 +514,30 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
514
514
  </table>
515
515
  </div>`;
516
516
  }
517
+ const liveAdjusterHtml = `
518
+ <div class="card" style="margin-top: 2rem; background: #131c2e; border: 1px solid #1e293b;">
519
+ <h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; margin-bottom: 1rem;">
520
+ \u{1F39B}\uFE0F Live Concurrency Adjuster (Mid-Test Simulation)
521
+ </h3>
522
+ <div style="display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;">
523
+ <div style="flex: 1; min-width: 280px;">
524
+ <label for="concurrencySlider" style="display: block; font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem;">
525
+ Scale Virtual Users (VUs): <strong id="sliderValue" style="color: #38bdf8;">${config.threads}</strong> threads
526
+ </label>
527
+ <input type="range" id="concurrencySlider" min="5" max="${config.maxThreads || 300}" step="5" value="${config.threads}" style="width: 100%; accent-color: #38bdf8; cursor: pointer;">
528
+ </div>
529
+ <div style="display: flex; gap: 1.5rem; text-align: center;">
530
+ <div style="background: #090d16; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid #1e293b;">
531
+ <div style="font-size: 0.7rem; color: #64748b; text-transform: uppercase;">Sim. Throughput</div>
532
+ <div id="simThroughput" style="font-size: 1.2rem; font-weight: bold; color: #f97316;">${cards.throughput.toFixed(0)}/s</div>
533
+ </div>
534
+ <div style="background: #090d16; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid #1e293b;">
535
+ <div style="font-size: 0.7rem; color: #64748b; text-transform: uppercase;">Sim. Latency</div>
536
+ <div id="simLatency" style="font-size: 1.2rem; font-weight: bold; color: #10b981;">${cards.ttfb.toFixed(1)}ms</div>
537
+ </div>
538
+ </div>
539
+ </div>
540
+ </div>`;
517
541
  const rightSizingHtml = `
518
542
  <div class="card" style="margin-top: 2rem; background: #131c2e; border: 1px solid #1e293b;">
519
543
  <h3 style="color: #38bdf8; display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem;">
@@ -574,7 +598,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
574
598
  .badge-5xx { background: rgba(220, 38, 38, 0.2); color: #f87171; }
575
599
  .matrix-value { font-size: 1rem; font-weight: bold; color: #ffffff; }
576
600
 
577
- .charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
601
+ .charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
578
602
  .graph-card { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.5rem; }
579
603
  .graph-title { font-size: 1.1rem; font-weight: 700; color: #ffffff; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
580
604
 
@@ -590,7 +614,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
590
614
  <div class="container">
591
615
  <div class="header">
592
616
  <h1>\u{1F525} Blaze Core Performance Analysis</h1>
593
- <div class="meta">Target Script: <code>${config.targetScript}</code> (Cold-Start Sieve Active)</div>
617
+ <div class="meta">Target Script: <code>${config.targetScript}</code></div>
594
618
  </div>
595
619
 
596
620
  <div class="cards-wrapper">
@@ -630,7 +654,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
630
654
 
631
655
  <div class="top-layout-grid">
632
656
  <div class="verdict-box">
633
- <div class="verdict-title">\u{1F916} AI Stress-Testing Agent Verdict (Knee-Point: ${cards.saturationKneePoint} VUs)</div>
657
+ <div class="verdict-title">\u{1F916} AI Stress-Testing Agent Verdict</div>
634
658
  <div class="verdict-text">${verdictReason}</div>
635
659
  <div class="verdict-waves">${waveListItems}</div>
636
660
  </div>
@@ -665,11 +689,18 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
665
689
  </div>
666
690
 
667
691
  <div class="graph-card">
668
- <div class="graph-title">\u{1F504} Active Concurrency (VUs) vs. Time-to-Failure (TTF) Trend</div>
692
+ <div class="graph-title">\u{1F504} Active Concurrency (VUs) vs. TTF Trend</div>
669
693
  <div style="height: 280px; position: relative;">
670
694
  <canvas id="concurrencyChart"></canvas>
671
695
  </div>
672
696
  </div>
697
+
698
+ <div class="graph-card">
699
+ <div class="graph-title">\u{1F369} HTTP Status Code Proportions</div>
700
+ <div style="height: 280px; position: relative;">
701
+ <canvas id="statusDonutChart"></canvas>
702
+ </div>
703
+ </div>
673
704
  </div>
674
705
 
675
706
  <div class="card">
@@ -700,12 +731,29 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
700
731
  </tbody>
701
732
  </table>
702
733
  </div>
734
+ ${liveAdjusterHtml}
703
735
  ${rightSizingHtml}
704
736
  ${logClustersHtml}
705
737
  </div>
706
738
 
707
739
  <script>
708
740
  const labels = ${JSON.stringify(labels)};
741
+ const baseThroughput = ${cards.throughput};
742
+ const baseLatency = ${cards.ttfb};
743
+
744
+ // Live Concurrency Adjuster interactive client logic[cite: 1]
745
+ const slider = document.getElementById('concurrencySlider');
746
+ const sliderVal = document.getElementById('sliderValue');
747
+ const simThroughput = document.getElementById('simThroughput');
748
+ const simLatency = document.getElementById('simLatency');
749
+
750
+ slider.addEventListener('input', (e) => {
751
+ const val = parseInt(e.target.value, 10);
752
+ sliderVal.textContent = val;
753
+ const factor = val / ${config.threads || 10};
754
+ simThroughput.textContent = (baseThroughput * Math.min(factor, 2.5)).toFixed(0) + '/s';
755
+ simLatency.textContent = (baseLatency * Math.pow(factor, 0.8)).toFixed(1) + 'ms';
756
+ });
709
757
 
710
758
  new Chart(document.getElementById('volumeChart'), {
711
759
  type: 'bar',
@@ -783,6 +831,27 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
783
831
  }
784
832
  }
785
833
  });
834
+
835
+ new Chart(document.getElementById('statusDonutChart'), {
836
+ type: 'doughnut',
837
+ data: {
838
+ labels: ['2xx Success', '3xx Redirect', '4xx Client Err', '5xx Server Err'],
839
+ datasets: [{
840
+ data: [${responseMatrix.total2xx}, ${responseMatrix.total3xx}, ${responseMatrix.total4xx}, ${responseMatrix.total5xx}],
841
+ backgroundColor: ['#4ade80', '#cbd5e1', '#fde047', '#f87171'],
842
+ borderWidth: 1,
843
+ borderColor: '#1e293b'
844
+ }]
845
+ },
846
+ options: {
847
+ responsive: true,
848
+ maintainAspectRatio: false,
849
+ plugins: {
850
+ legend: { position: 'top', labels: { color: '#94a3b8', font: { size: 11 } } }
851
+ },
852
+ cutout: '65%'
853
+ }
854
+ });
786
855
  </script></body></html>`;
787
856
  try {
788
857
  fs.writeFileSync(config.outputHtml, htmlContent, "utf-8");
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
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",