MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / markdownTable

Function markdownTable

scripts/bench-ci-compare.mjs:753–778  ·  view source on GitHub ↗
(checks)

Source from the content-addressed store, hash-verified

751}
752
753function markdownTable(checks) {
754 if (checks.length === 0) {
755 return "_None._\n";
756 }
757
758 const lines = [
759 "| Status | Scenario | Metric | Baseline | Current | Delta | Threshold |",
760 "| --- | --- | --- | ---: | ---: | ---: | --- |",
761 ];
762
763 for (const check of checks) {
764 lines.push(
765 [
766 `| ${statusToLabel(check.status)}`,
767 `${scenarioToString(check)}`,
768 `${check.metric}`,
769 `${formatNumber(check.baselineValue)}`,
770 `${formatNumber(check.currentValue)}`,
771 `${formatDelta(check.delta, check.deltaPct)}`,
772 `${formatThreshold(check.threshold)} |`,
773 ].join(" | "),
774 );
775 }
776
777 return `${lines.join("\n")}\n`;
778}
779
780export function toMarkdownReport(report, paths) {
781 const hard = report.checks.filter((c) => HARD_STATUSES.has(c.status));

Callers 1

toMarkdownReportFunction · 0.85

Calls 6

statusToLabelFunction · 0.85
scenarioToStringFunction · 0.85
formatDeltaFunction · 0.85
formatThresholdFunction · 0.85
formatNumberFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected