blaze-performance-tester 2.0.11 → 2.0.12

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
@@ -144,7 +144,7 @@ try {
144
144
  const getPercentile = (arr, pct) => {
145
145
  if (arr.length === 0) return 0;
146
146
  const index = Math.ceil(pct / 100 * arr.length) - 1;
147
- return arr[Math.max(0, index)];
147
+ return arr[arr.length === 0 ? 0 : Math.max(0, index)];
148
148
  };
149
149
  const p90 = getPercentile(latencies, 90) || 48.2;
150
150
  const p95 = getPercentile(latencies, 95) || 72.1;
@@ -182,7 +182,8 @@ try {
182
182
  const maxSecondVolume = Math.max(...successTimeline.map((s, idx) => s + failureTimeline[idx]), 1);
183
183
  const svgWidth = 1e3;
184
184
  const svgHeight = 150;
185
- let pointsStr = "";
185
+ let threadsPointsStr = "";
186
+ let ttfPointsStr = "";
186
187
  for (let s = 0; s < actualDurationSec; s++) {
187
188
  const successCount = successTimeline[s];
188
189
  const failureCount = failureTimeline[s];
@@ -191,8 +192,10 @@ try {
191
192
  const successPct = (successCount / maxSecondVolume * 100).toFixed(1);
192
193
  const failurePct = (failureCount / maxSecondVolume * 100).toFixed(1);
193
194
  const xCoord = s / (actualDurationSec - 1 || 1) * svgWidth;
194
- const yCoord = svgHeight - currentActiveThreads / Math.max(vusCount, 1) * (svgHeight - 20);
195
- pointsStr += `${xCoord.toFixed(1)},${yCoord.toFixed(1)} `;
195
+ const yCoordThreads = svgHeight - currentActiveThreads / Math.max(vusCount, 1) * (svgHeight - 20);
196
+ threadsPointsStr += `${xCoord.toFixed(1)},${yCoordThreads.toFixed(1)} `;
197
+ const yCoordFailure = svgHeight - failureCount / maxSecondVolume * (svgHeight - 20);
198
+ ttfPointsStr += `${xCoord.toFixed(1)},${yCoordFailure.toFixed(1)} `;
196
199
  timelineHtmlElements += `
197
200
  <div class="timeline-column">
198
201
  <div class="timeline-bar-stack">
@@ -282,7 +285,9 @@ try {
282
285
  .legend { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; justify-content: flex-end; font-size: 0.85rem; }
283
286
  .legend-item { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); }
284
287
  .legend-box { width: 12px; height: 12px; border-radius: 2px; }
285
- .legend-line { width: 20px; height: 3px; background-color: var(--threads); border-radius: 1px; }
288
+ .legend-line { width: 20px; height: 3px; border-radius: 1px; }
289
+ .legend-line.threads-line { background-color: var(--threads); }
290
+ .legend-line.ttf-line { background-color: #f43f5e; border-top: 2px dashed #f43f5e; height: 0; }
286
291
  </style>
287
292
  </head>
288
293
  <body>
@@ -328,16 +333,20 @@ try {
328
333
  <div class="card" style="padding:0.85rem 1.25rem;"><div class="card-title" style="font-size:0.75rem;">Stability (Std Dev)</div><div class="card-value" style="font-size:1.25rem; color:var(--text-muted);">\xB1${stdDev.toFixed(1)} ms</div></div>
329
334
  </div>
330
335
 
331
- <h2>\u{1F504} Throughput, Errors & Active Threads Concurrency Correlation</h2>
336
+ <h2>\u{1F504} Throughput, TTF Trend & Active Threads Concurrency Correlation</h2>
332
337
  <div class="legend">
333
338
  <div class="legend-item"><div class="legend-box success-fill"></div> Successful Requests</div>
334
339
  <div class="legend-item"><div class="legend-box failure-fill"></div> Failed Workloads</div>
335
- <div class="legend-item"><div class="legend-line"></div> Active VU Threads</div>
340
+ <div class="legend-item"><div class="legend-line threads-line"></div> Active VU Threads</div>
341
+ <div class="legend-item"><div class="legend-line ttf-line"></div> Time-to-Failure (TTF) Trend</div>
336
342
  </div>
337
343
 
338
344
  <div class="timeline-wrapper">
339
345
  <svg class="timeline-svg-layer" viewBox="0 0 1000 150" preserveAspectRatio="none">
340
- <polyline fill="none" stroke="#38bdf8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" points="${pointsStr.trim()}"></polyline>
346
+ <!-- Concurrency Trend Line -->
347
+ <polyline fill="none" stroke="#38bdf8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" points="${threadsPointsStr.trim()}"></polyline>
348
+ <!-- Time-to-Failure (TTF) Trend Line -->
349
+ <polyline fill="none" stroke="#f43f5e" stroke-width="2.5" stroke-dasharray="6,4" stroke-linecap="round" stroke-linejoin="round" points="${ttfPointsStr.trim()}"></polyline>
341
350
  </svg>
342
351
  <div class="timeline-container">
343
352
  ${timelineHtmlElements}
@@ -352,7 +361,7 @@ try {
352
361
  <div class="chart-row"><div class="chart-label">Average</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: ${pctAvg}%;"></div></div><div class="chart-value-tag">${avgLatency.toFixed(1)} ms</div></div>
353
362
  <div class="chart-row"><div class="chart-label">90% Line</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: ${pct90}%;"></div></div><div class="chart-value-tag">${p90.toFixed(1)} ms</div></div>
354
363
  <div class="chart-row"><div class="chart-label">95% Line</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: ${pct95}%;"></div></div><div class="chart-value-tag">${p95.toFixed(1)} ms</div></div>
355
- <div class="chart-row"><div class="chart-label">99% Line</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: ${pct99}%;">%;"></div></div><div class="chart-value-tag">${p99.toFixed(1)} ms</div></div>
364
+ <div class="chart-row"><div class="chart-label">99% Line</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: ${pct99}%;"></div></div><div class="chart-value-tag">${p99.toFixed(1)} ms</div></div>
356
365
  <div class="chart-row"><div class="chart-label">Maximum</div><div class="chart-bar-wrapper"><div class="chart-bar" style="width: 100%;"></div></div><div class="chart-value-tag">${maxLatency.toFixed(1)} ms</div></div>
357
366
  </div>
358
367
  </div>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
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",