blaze-performance-tester 3.1.36 → 3.1.38
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 +14 -8
- 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>`;
|
|
@@ -693,7 +699,7 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
693
699
|
</div>
|
|
694
700
|
<div style="display: flex; gap: 1.5rem; text-align: center;">
|
|
695
701
|
<div style="background: #090d16; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid #1e293b;">
|
|
696
|
-
<div style="font-size: 0.
|
|
702
|
+
<div style="font-size: 0.7 hydrodynamic; color: #64748b; text-transform: uppercase;">Sim. Throughput</div>
|
|
697
703
|
<div id="simThroughput" style="font-size: 1.2rem; font-weight: bold; color: #f97316;">${cards.throughput.toFixed(0)}/s</div>
|
|
698
704
|
</div>
|
|
699
705
|
<div style="background: #090d16; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid #1e293b;">
|
|
@@ -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>
|
|
@@ -1105,8 +1111,8 @@ function exportHtmlDashboard(history, config, verdictReason, semanticReport, res
|
|
|
1105
1111
|
},
|
|
1106
1112
|
scales: {
|
|
1107
1113
|
x: { grid: { color: '#1e293b' }, ticks: { color: '#64748b' } },
|
|
1108
|
-
|
|
1109
|
-
|
|
1114
|
+
yThreads: { position: 'left', grid: { color: '#1e293b' }, ticks: { color: '#38bdf8' }, title: { display: true, text: 'VUs / Threads', color: '#38bdf8' } },
|
|
1115
|
+
yTtf: { position: 'right', grid: { drawOnChartArea: false }, ticks: { color: '#f43f5e' }, title: { display: true, text: 'TTF Index / Latency ms', color: '#f43f5e' } }
|
|
1110
1116
|
}
|
|
1111
1117
|
}
|
|
1112
1118
|
});
|
|
Binary file
|