blaze-performance-tester 3.2.43 → 3.2.45

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.
Files changed (2) hide show
  1. package/dist/cli.js +29 -38
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -9776,9 +9776,9 @@ async function runIntelligentAgenticStressTest(config) {
9776
9776
  let aggregateErrorLogs = [];
9777
9777
  let lastRawRequests = [];
9778
9778
  let total1xx = 0, total2xx = 0, total3xx = 0, total4xx = 0, total5xx = 0;
9779
- let totalGet = 0, totalPost = 0, totalPut = 0, totalDelete = 0, totalPatch = 0;
9780
9779
  let totalRequestsAccumulator = 0;
9781
9780
  const globalCodeCounts = { 400: 0, 401: 0, 403: 0, 404: 0, 429: 0, 500: 0, 502: 0, 503: 0, 504: 0 };
9781
+ const globalVerbCounts = { GET: 0, POST: 0, PUT: 0, DELETE: 0, PATCH: 0 };
9782
9782
  const globalMetricsAccumulator = { dns: [], tcp: [], tls: [], ttfb: [], latencies: [], bandwidths: [] };
9783
9783
  let currentThreads = Math.min(config.maxThreads, Math.max(5, Math.floor(config.maxThreads * 0.2)));
9784
9784
  const baseStep = config.stepSize;
@@ -9797,16 +9797,14 @@ async function runIntelligentAgenticStressTest(config) {
9797
9797
  total3xx += metrics.c3xx;
9798
9798
  total4xx += metrics.c4xx;
9799
9799
  total5xx += metrics.c5xx;
9800
- totalGet += metrics.verbCounts.GET;
9801
- totalPost += metrics.verbCounts.POST;
9802
- totalPut += metrics.verbCounts.PUT;
9803
- totalDelete += metrics.verbCounts.DELETE;
9804
- totalPatch += metrics.verbCounts.PATCH;
9805
9800
  totalRequestsAccumulator += metrics.totalRequests;
9806
9801
  const targetCodes = [400, 401, 403, 404, 429, 500, 502, 503, 504];
9807
9802
  targetCodes.forEach((code) => {
9808
9803
  globalCodeCounts[code] += metrics.codeCounts[code] || 0;
9809
9804
  });
9805
+ ["GET", "POST", "PUT", "DELETE", "PATCH"].forEach((verb) => {
9806
+ globalVerbCounts[verb] += metrics.verbCounts[verb] || 0;
9807
+ });
9810
9808
  globalMetricsAccumulator.dns.push(metrics.avgDnsMs);
9811
9809
  globalMetricsAccumulator.tcp.push(metrics.avgTcpMs);
9812
9810
  globalMetricsAccumulator.tls.push(metrics.avgTlsMs);
@@ -9903,26 +9901,7 @@ async function runIntelligentAgenticStressTest(config) {
9903
9901
  breakdownRates[code] = totalRequestsAccumulator === 0 ? 0 : globalCodeCounts[code] / totalRequestsAccumulator * 100;
9904
9902
  });
9905
9903
  const baselineData = loadBaselineData(config.baselinePath);
9906
- exportHtmlDashboard(
9907
- history,
9908
- config,
9909
- verdictReason,
9910
- semanticReport,
9911
- {
9912
- total1xx,
9913
- total2xx,
9914
- total3xx,
9915
- total4xx,
9916
- total5xx,
9917
- breakdownRates,
9918
- verbCounts: { GET: totalGet, POST: totalPost, PUT: totalPut, DELETE: totalDelete, PATCH: totalPatch }
9919
- },
9920
- finalSummaryCards,
9921
- lastRawRequests,
9922
- geminiAnalysisHtml,
9923
- wittyBriefingText,
9924
- baselineData
9925
- );
9904
+ exportHtmlDashboard(history, config, verdictReason, semanticReport, { total1xx, total2xx, total3xx, total4xx, total5xx, breakdownRates, verbCounts: globalVerbCounts }, finalSummaryCards, lastRawRequests, geminiAnalysisHtml, wittyBriefingText, baselineData);
9926
9905
  }
9927
9906
  async function runStandardStressTest(config) {
9928
9907
  console.log(`\u{1F3CB}\uFE0F Running Standard Stress Test [Threads: ${config.threads} | Duration: ${config.durationSec}s | RampUp: ${config.rampUpSec}s | RampDown: ${config.rampDownSec}s]`);
@@ -10019,7 +9998,7 @@ function generateSimulationData(threads, durationSec, maxAllowedLatencyMs, rampU
10019
9998
  const targetThresholdBreak = Math.max(5, Math.floor(maxAllowedLatencyMs * 0.05));
10020
9999
  const errorPool = getFallbackClusterLogs();
10021
10000
  const deviceProfilesList = ["Mobile Safari", "Desktop Chrome", "Desktop Firefox", "Edge Corporate"];
10022
- const httpVerbsList = ["GET", "POST", "PUT", "DELETE", "PATCH"];
10001
+ const verbList = ["GET", "GET", "GET", "GET", "POST", "POST", "PUT", "DELETE", "PATCH"];
10023
10002
  for (let i = 0; i < totalRequests; i++) {
10024
10003
  const offsetMs = Math.random() * totalTestMs;
10025
10004
  const loadFactor = getLoadMultiplier(offsetMs, rampUpMs, steadyMs, rampDownMs);
@@ -10047,7 +10026,7 @@ function generateSimulationData(threads, durationSec, maxAllowedLatencyMs, rampU
10047
10026
  statusCode = targetResponseCodes[Math.floor(Math.random() * targetResponseCodes.length)];
10048
10027
  errorMessage = errorPool[Math.floor(Math.random() * errorPool.length)];
10049
10028
  }
10050
- const verb = httpVerbsList[i % httpVerbsList.length];
10029
+ const method = verbList[i % verbList.length];
10051
10030
  data.push({
10052
10031
  durationMs: isError ? baseLatency * 0.1 : baseLatency,
10053
10032
  timestampMs: startTime + offsetMs,
@@ -10057,7 +10036,7 @@ function generateSimulationData(threads, durationSec, maxAllowedLatencyMs, rampU
10057
10036
  statusCode,
10058
10037
  errorMessage,
10059
10038
  deviceProfile,
10060
- method: verb
10039
+ method
10061
10040
  });
10062
10041
  }
10063
10042
  return data.sort((a, b) => a.timestampMs - b.timestampMs);
@@ -10073,7 +10052,7 @@ function processMetricsTelemetry(requests, durationSec) {
10073
10052
  const avgTlsMs = mathUtils.mean(requests.map((r) => r.tlsTimeMs || 0));
10074
10053
  const avgTtfbMs = avgDnsMs + avgTcpMs + avgTlsMs + avgLatencyMs * 0.3;
10075
10054
  let c1xx = 0, c2xx = 0, c3xx = 0, c4xx = 0, c5xx = 0;
10076
- const codeCounts = { 400: 0, 401: 0, 403: 0, 404: 0, 429: 0, 500: 502, 503: 0, 504: 0 };
10055
+ const codeCounts = { 400: 0, 401: 0, 403: 0, 404: 0, 429: 0, 500: 0, 502: 0, 503: 0, 504: 0 };
10077
10056
  const verbCounts = { GET: 0, POST: 0, PUT: 0, DELETE: 0, PATCH: 0 };
10078
10057
  [400, 401, 403, 404, 429, 500, 502, 503, 504].forEach((c) => codeCounts[c] = 0);
10079
10058
  requests.forEach((r) => {
@@ -10094,7 +10073,7 @@ function processMetricsTelemetry(requests, durationSec) {
10094
10073
  if (verb in verbCounts) {
10095
10074
  verbCounts[verb]++;
10096
10075
  } else {
10097
- verbCounts.GET++;
10076
+ verbCounts["GET"]++;
10098
10077
  }
10099
10078
  });
10100
10079
  const errorCount = c4xx + c5xx;
@@ -10359,6 +10338,8 @@ ${formattedTicketLogs}
10359
10338
  </div>
10360
10339
  `;
10361
10340
  }).join("");
10341
+ const verbCounts = responseMatrix.verbCounts || { GET: 0, POST: 0, PUT: 0, DELETE: 0, PATCH: 0 };
10342
+ const totalVerbReqs = (verbCounts.GET || 0) + (verbCounts.POST || 0) + (verbCounts.PUT || 0) + (verbCounts.DELETE || 0) + (verbCounts.PATCH || 0);
10362
10343
  const gaugeColor = cards.healthScore >= 90 ? "#10b981" : cards.healthScore >= 70 ? "#f59e0b" : "#ef4444";
10363
10344
  const htmlContent = `<!DOCTYPE html>
10364
10345
  <html lang="${config.locale}" dir="${dir}">
@@ -10413,7 +10394,7 @@ ${formattedTicketLogs}
10413
10394
  .status-optimal { color: #16a34a; font-weight: 600; }
10414
10395
  .status-warning { color: #ca8a04; font-weight: 600; }
10415
10396
 
10416
- .charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
10397
+ .charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
10417
10398
  .graph-card { background: #131c2e; border: 1px solid #1e293b; border-radius: 8px; padding: 1.5rem; }
10418
10399
  .graph-title { font-size: 1.1rem; font-weight: 700; color: #ffffff; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
10419
10400
 
@@ -10885,15 +10866,16 @@ ${formattedTicketLogs}
10885
10866
  }
10886
10867
  });
10887
10868
 
10888
- // Render HTTP Verb Distribution Donut Chart
10889
- const verbData = ${JSON.stringify(responseMatrix.verbCounts || { GET: 0, POST: 0, PUT: 0, DELETE: 0, PATCH: 0 })};
10869
+ // HTTP Verb Distribution Donut Chart
10870
+ const totalVerbReqs = ${totalVerbReqs};
10871
+ const verbDataRaw = [${verbCounts.GET || 0}, ${verbCounts.POST || 0}, ${verbCounts.PUT || 0}, ${verbCounts.DELETE || 0}, ${verbCounts.PATCH || 0}];
10890
10872
  new Chart(document.getElementById('verbDonutChart'), {
10891
10873
  type: 'doughnut',
10892
10874
  data: {
10893
10875
  labels: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
10894
10876
  datasets: [{
10895
- data: [verbData.GET || 0, verbData.POST || 0, verbData.PUT || 0, verbData.DELETE || 0, verbData.PATCH || 0],
10896
- backgroundColor: ['#38bdf8', '#10b981', '#f59e0b', '#ef4444', '#8b5cf6'],
10877
+ data: verbDataRaw,
10878
+ backgroundColor: ['#10b981', '#38bdf8', '#f59e0b', '#ef4444', '#a855f7'],
10897
10879
  borderWidth: 1,
10898
10880
  borderColor: '#1e293b'
10899
10881
  }]
@@ -10903,7 +10885,16 @@ ${formattedTicketLogs}
10903
10885
  maintainAspectRatio: false,
10904
10886
  plugins: {
10905
10887
  legend: { position: 'top', labels: { color: '#94a3b8', font: { size: 11 } } },
10906
- cutout: '65%'
10888
+ cutout: '65%',
10889
+ tooltip: {
10890
+ callbacks: {
10891
+ label: function(context) {
10892
+ const count = context.parsed || 0;
10893
+ const pct = totalVerbReqs > 0 ? ((count / totalVerbReqs) * 100).toFixed(1) : '0.0';
10894
+ return ' ' + context.label + ': ' + count + ' (' + pct + '%)';
10895
+ }
10896
+ }
10897
+ }
10907
10898
  }
10908
10899
  }
10909
10900
  });
@@ -10996,7 +10987,7 @@ Options:
10996
10987
  `);
10997
10988
  }
10998
10989
  var program2 = new Command();
10999
- program2.name("blaze").description("Blaze Performance Tester \u2014 Enterprise AI-Native Performance Platform").version("1.0");
10990
+ program2.name("blaze").description("Blaze Performance Tester \u2014 Enterprise AI-Native Performance Platform");
11000
10991
  export {
11001
10992
  runCli
11002
10993
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "3.2.43",
3
+ "version": "3.2.45",
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",