blaze-performance-tester 3.2.1 → 3.2.3
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 +10 -7
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -225,7 +225,8 @@ Rules:
|
|
|
225
225
|
4. Do NOT wrap code blocks in backticks like \`\`\`typescript. Start directly with the TypeScript imports and export block. Do not include markdown or text commentary.
|
|
226
226
|
`;
|
|
227
227
|
try {
|
|
228
|
-
const
|
|
228
|
+
const endpoint = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=" + apiKey;
|
|
229
|
+
const response = await fetch(endpoint, {
|
|
229
230
|
method: "POST",
|
|
230
231
|
headers: { "Content-Type": "application/json" },
|
|
231
232
|
body: JSON.stringify({
|
|
@@ -312,14 +313,15 @@ Provide a comprehensive, highly technical Root Cause Analysis (RCA) report struc
|
|
|
312
313
|
|
|
313
314
|
Paragraph 1 - GENERATIVE INCIDENT NARRATIVE: Write a clean, plain-English story of the incident that builds a chronological timeline of the failure event (e.g., "At 00:12s, traffic spiked by 40%. This caused database connection pool exhaustion, which triggered a cascading series of 504 errors on the checkout endpoint, ultimately hitting a knee-point crash at 500 virtual users."). Translate raw logs and metrics trends directly into an easy-to-read chronological story.
|
|
314
315
|
|
|
315
|
-
Paragraph 2 - TECHNICAL BOTTLENECK
|
|
316
|
+
Paragraph 2 - TECHNICAL BOTTLENECK DIAGNOSOR: Diagnose the exact bottleneck point (CPU saturation, socket pool exhaustion, database lock contention, etc.) indicated by how latency changes dynamically alongside concurrency, and correlate unique structural exception/error patterns directly to the performance drops.
|
|
316
317
|
|
|
317
318
|
Paragraph 3 - ARCHITECTURAL SIZING RECOMMENDATIONS: Give concrete, infrastructure sizing or cloud architecture remediation recommendations based on the stress points found.
|
|
318
319
|
|
|
319
320
|
CRITICAL: Return ONLY plain paragraph text. Do not use markdown headers (###). If you use bold text, use standard HTML <strong> tags. Wrap lines cleanly.
|
|
320
321
|
`;
|
|
321
322
|
try {
|
|
322
|
-
const
|
|
323
|
+
const endpoint = `[https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$](https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$){apiKey}`;
|
|
324
|
+
const response = await fetch(endpoint, {
|
|
323
325
|
method: "POST",
|
|
324
326
|
headers: { "Content-Type": "application/json" },
|
|
325
327
|
body: JSON.stringify({
|
|
@@ -356,13 +358,13 @@ async function executeTestPipeline(config) {
|
|
|
356
358
|
const transactionalScenario = [
|
|
357
359
|
{
|
|
358
360
|
name: "Fetch Target Anti-Forgery Nonce",
|
|
359
|
-
url: "
|
|
361
|
+
url: "https://httpbin.org/json",
|
|
360
362
|
method: "GET",
|
|
361
363
|
body: null
|
|
362
364
|
},
|
|
363
365
|
{
|
|
364
366
|
name: "Perform Contextual Post Action",
|
|
365
|
-
url: "
|
|
367
|
+
url: "https://httpbin.org/post?verification=${csrf_token}",
|
|
366
368
|
method: "POST",
|
|
367
369
|
body: JSON.stringify({
|
|
368
370
|
data: "performance_payload",
|
|
@@ -1060,10 +1062,11 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
1060
1062
|
`;
|
|
1061
1063
|
}).join("");
|
|
1062
1064
|
const gaugeColor = cards.healthScore >= 90 ? "#10b981" : cards.healthScore >= 70 ? "#f59e0b" : "#ef4444";
|
|
1065
|
+
const chartJsCdn = "https://cdn.jsdelivr.net/npm/chart.js";
|
|
1063
1066
|
const htmlContent = `<!DOCTYPE html><html lang="en"><head>
|
|
1064
1067
|
<meta charset="UTF-8">
|
|
1065
1068
|
<title>Blaze Core Performance Report</title>
|
|
1066
|
-
<script src="
|
|
1069
|
+
<script src="${chartJsCdn}"></script>
|
|
1067
1070
|
<style>
|
|
1068
1071
|
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0b111e; color: #f8fafc; margin: 0; padding: 2rem; }
|
|
1069
1072
|
.container { max-width: 1300px; margin: 0 auto; }
|
|
@@ -1119,7 +1122,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
1119
1122
|
</style></head><body>
|
|
1120
1123
|
<div class="container">
|
|
1121
1124
|
<div class="header">
|
|
1122
|
-
<h1>\u{1F525} Blaze Core Performance
|
|
1125
|
+
<h1>\u{1F525} Blaze Core Performance Report</h1>
|
|
1123
1126
|
<div class="meta">Target Script: <code>${config.targetScript}</code> | Ramp-Up: ${config.rampUpSec}s | Ramp-Down: ${config.rampDownSec}s</div>
|
|
1124
1127
|
</div>
|
|
1125
1128
|
|
|
Binary file
|