fix: mark browser memory freezes red
This commit is contained in:
@@ -2227,6 +2227,14 @@ function renderMarkdown(report) {
|
||||
const alertSummary = report.runtimeAlerts?.summary || {};
|
||||
const apiDomLag = report.apiDomLag || {};
|
||||
const apiDomLagSummary = apiDomLag.summary || {};
|
||||
const browserProcess = report.browserProcess || {};
|
||||
const browserProcessSummary = browserProcess.summary || {};
|
||||
const browserProcessLines = Array.isArray(browserProcess.memorySamples) && browserProcess.memorySamples.length > 0
|
||||
? browserProcess.memorySamples.slice(-40).map((item) => "- " + (item.ts || "-") + " seq=" + (item.seq ?? "-") + " totalRssMb=" + (item.totalRssMb ?? "-") + " maxProcessRssMb=" + (item.maxProcessRssMb ?? "-") + " totalGrowthMb=" + (item.totalRssGrowthMb ?? "-") + " processGrowthMb=" + (item.maxProcessRssGrowthMb ?? "-") + " processes=" + (item.processCount ?? "-")).join("\n")
|
||||
: "- 无 browser-process RSS 样本。";
|
||||
const browserResponsivenessLines = Array.isArray(browserProcess.responsivenessEvents) && browserProcess.responsivenessEvents.length > 0
|
||||
? browserProcess.responsivenessEvents.slice(-40).map((item) => "- " + (item.ts || "-") + " role=" + (item.pageRole || "-") + " pageId=" + (item.pageId || "-") + " latencyMs=" + (item.responsivenessLatencyMs ?? "-") + " timeout=" + String(item.responsivenessTimeout === true) + " cdpTimeouts=" + (item.cdpTimeoutCount ?? 0)).join("\n")
|
||||
: "- 无 Playwright/CDP 响应性超阈值样本。";
|
||||
const projectManagement = report.projectManagement || {};
|
||||
const projectSummary = projectManagement.summary || {};
|
||||
const projectCommandLines = Array.isArray(projectManagement.commands) && projectManagement.commands.length > 0
|
||||
@@ -2336,6 +2344,16 @@ function renderMarkdown(report) {
|
||||
+ "- console: " + (report.counts.console ?? 0) + "\n"
|
||||
+ "- errors: " + report.counts.errors + "\n\n"
|
||||
+ "## Findings\n\n" + findingLines + "\n\n"
|
||||
+ "## Browser process\n\n"
|
||||
+ "- browserProcessSamples: " + (browserProcessSummary.sampleCount ?? 0) + "\n"
|
||||
+ "- pageMetricCount: " + (browserProcessSummary.pageMetricCount ?? 0) + "\n"
|
||||
+ "- maxTotalRssMb: " + (browserProcessSummary.maxTotalRssMb ?? "-") + " / red=" + (browserProcessSummary.totalRssRedMb ?? "-") + "\n"
|
||||
+ "- maxProcessRssMb: " + (browserProcessSummary.maxProcessRssMb ?? "-") + " / red=" + (browserProcessSummary.processRssRedMb ?? "-") + "\n"
|
||||
+ "- maxTotalRssGrowthMb: " + (browserProcessSummary.maxTotalRssGrowthMb ?? "-") + " / red=" + (browserProcessSummary.growthRedMb ?? "-") + " windowMs=" + (browserProcessSummary.growthWindowMs ?? "-") + "\n"
|
||||
+ "- responsivenessSlowCount: " + (browserProcessSummary.responsivenessSlowCount ?? 0) + " timeoutCount=" + (browserProcessSummary.responsivenessTimeoutCount ?? 0) + " redMs=" + (browserProcessSummary.responsivenessRedMs ?? "-") + "\n"
|
||||
+ "- cdpMetricsTimeoutCount: " + (browserProcessSummary.cdpMetricsTimeoutCount ?? 0) + "\n\n"
|
||||
+ "### Browser RSS samples\n\n" + browserProcessLines + "\n\n"
|
||||
+ "### Browser responsiveness samples\n\n" + browserResponsivenessLines + "\n\n"
|
||||
+ "## Project management\n\n"
|
||||
+ "- enabled: " + String(projectSummary.enabled === true) + "\n"
|
||||
+ "- projectSampleCount: " + (projectSummary.projectSampleCount ?? 0) + "\n"
|
||||
|
||||
Reference in New Issue
Block a user