Skip to content

Commit 054bc4d

Browse files
committed
fix table (again)
1 parent bfba76c commit 054bc4d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

ts-perf/packages/commands/src/benchmark/print/console/benchmark.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ export function printBenchmark(benchmark: Benchmark, options: BenchmarkOptions,
2828
{ className: "group header", border: Border.single.updateFrom({ top: "double" }) },
2929
{
3030
className: "body",
31-
match: (x: MeasurementPivot) => x.metric === "Config Time",
31+
match: (() => {
32+
let alreadyMatched = false;
33+
return (x: MeasurementPivot) => {
34+
if (alreadyMatched || (x.metric !== "Config Time" && x.metric !== "Parse Time")) {
35+
return false;
36+
}
37+
return alreadyMatched = true;
38+
};
39+
})(),
3240
border: { top: "single" },
3341
},
3442
{ className: "body", match: (x: MeasurementPivot) => x.metric === "Total Time", border: { top: "single" } },

ts-perf/packages/commands/src/benchmark/print/console/comparison.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,15 @@ export function printComparison(
104104
},
105105
{
106106
className: "body",
107-
match: (x: MeasurementComparisonPivot) => x.metric === "Config Time" || x.metric === "Parse Time",
107+
match: (() => {
108+
let alreadyMatched = false;
109+
return (x: MeasurementComparisonPivot) => {
110+
if (alreadyMatched || (x.metric !== "Config Time" && x.metric !== "Parse Time")) {
111+
return false;
112+
}
113+
return alreadyMatched = true;
114+
};
115+
})(),
108116
border: { top: "single" },
109117
},
110118
{

0 commit comments

Comments
 (0)