blaze-performance-tester 3.1.36 → 3.1.37
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 +18 -5
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -100,7 +100,7 @@ async function generateGeminiRCA(history, finalSummary, errorLogs) {
|
|
|
100
100
|
const prompt = `
|
|
101
101
|
You are an expert Performance & Systems Reliability Engineer. Analyze the following load test execution telemetry and logs:
|
|
102
102
|
|
|
103
|
-
[LOAD SUMMARY
|
|
103
|
+
[LOAD SUMMARY METRICS]
|
|
104
104
|
- Unified Blaze Health Score: ${finalSummary.healthScore}/100
|
|
105
105
|
- Saturation Knee Point: ${finalSummary.saturationKneePoint} VUs
|
|
106
106
|
- Peak Stability Variance (Std Dev): ${finalSummary.stdDev.toFixed(2)}ms
|
|
@@ -115,7 +115,9 @@ ${uniqueLogs || "No unique structural exceptions encountered."}
|
|
|
115
115
|
Provide a punchy, highly technical 3-paragraph Root Cause Analysis (RCA) report.
|
|
116
116
|
Paragraph 1: Diagnose the exact bottleneck point (CPU saturation, socket pool exhaustion, database lock contention, etc.) indicated by how latency changes with concurrency.
|
|
117
117
|
Paragraph 2: Correlate unique error patterns directly to performance drops.
|
|
118
|
-
Paragraph 3: Give concrete,
|
|
118
|
+
Paragraph 3: Give concrete, infrastructure or architectural sizing recommendations.
|
|
119
|
+
|
|
120
|
+
CRITICAL: Return ONLY plain paragraph text. Do not use markdown headers (###). If you use bold text, use standard HTML <strong> tags. Wrap lines cleanly.
|
|
119
121
|
`;
|
|
120
122
|
try {
|
|
121
123
|
const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=${apiKey}`, {
|
|
@@ -123,13 +125,17 @@ Paragraph 3: Give concrete, actionable infrastructure or architectural sizing re
|
|
|
123
125
|
headers: { "Content-Type": "application/json" },
|
|
124
126
|
body: JSON.stringify({
|
|
125
127
|
contents: [{ parts: [{ text: prompt }] }],
|
|
126
|
-
generationConfig: {
|
|
128
|
+
generationConfig: {
|
|
129
|
+
temperature: 0.2,
|
|
130
|
+
maxOutputTokens: 2048
|
|
131
|
+
// Expanded token safety margin to prevent mid-sentence cutting
|
|
132
|
+
}
|
|
127
133
|
})
|
|
128
134
|
});
|
|
129
135
|
const data = await response.json();
|
|
130
136
|
const candidateText = data?.candidates?.[0]?.content?.parts?.[0]?.text;
|
|
131
137
|
if (!candidateText) throw new Error("Malformed API structural response layout");
|
|
132
|
-
return candidateText.replace(/\n/g, "<br>");
|
|
138
|
+
return candidateText.replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\n/g, "<br>");
|
|
133
139
|
} catch (error) {
|
|
134
140
|
console.error("\u274C Gemini API processing breakdown failure:", error);
|
|
135
141
|
return `<span style="color: #f87171;">Failed to generate AI diagnosis framework: ${error.message}</span>`;
|
|
@@ -896,7 +902,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
896
902
|
<h3 style="color: #a78bfa; display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; border-bottom: 1px solid #1e293b; padding-bottom: 0.5rem;">
|
|
897
903
|
\u26A1 Gemini 2.5 Flash Autonomous Root Cause Analysis (RCA)
|
|
898
904
|
</h3>
|
|
899
|
-
<div style="font-size: 0.95rem; line-height: 1.6; color: #cbd5e1; padding: 0.5rem 0;">
|
|
905
|
+
<div style="font-size: 0.95rem; line-height: 1.6; color: #cbd5e1; padding: 0.5rem 0; white-space: pre-wrap; word-break: break-word;">
|
|
900
906
|
${geminiAnalysisHtml}
|
|
901
907
|
</div>
|
|
902
908
|
</div>
|
|
@@ -923,6 +929,13 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
923
929
|
</div>
|
|
924
930
|
</div>
|
|
925
931
|
|
|
932
|
+
<div class="graph-card">
|
|
933
|
+
<div class="graph-title">\u{1F369} HTTP Status Code Proportions</div>
|
|
934
|
+
<div style="height: 280px; position: relative;">
|
|
935
|
+
<canvas id="statusDonutChart"></canvas>
|
|
936
|
+
</div>
|
|
937
|
+
</div>
|
|
938
|
+
|
|
926
939
|
<div class="graph-card">
|
|
927
940
|
<div class="graph-title">\u{1F4C8} Time-to-First-Byte Scatter Plot</div>
|
|
928
941
|
<div style="height: 280px; position: relative;">
|
|
Binary file
|