Skip to content

Commit 858b837

Browse files
committed
add 'configTime and memoryAllocs` to results table
1 parent fcd445f commit 858b837

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

ts-perf/packages/api/src/model/sample.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export const compilerSampleKeys = [
77
"symbols",
88
"types",
99
"memoryUsed",
10+
"memoryAllocs",
11+
"configTime",
1012
"parseTime",
1113
"bindTime",
1214
"checkTime",
@@ -29,6 +31,8 @@ const compilerSampleKeyToDiagnosticName = {
2931
symbols: "Symbols",
3032
types: "Types",
3133
memoryUsed: "Memory used",
34+
memoryAllocs: "Memory allocs",
35+
configTime: "Config time",
3236
parseTime: "Parse time",
3337
bindTime: "Bind time",
3438
checkTime: "Check time",
@@ -62,6 +66,12 @@ export function isCompilerDiagnosticName(name: string): name is CompilerDiagnost
6266
export function getCompilerMetricName(sampleName: CompilerSampleKey) {
6367
// Special case names known by the benchmarking dashboard, even though they differ from what the compiler prints.
6468
switch (sampleName) {
69+
case "memoryUsed":
70+
return "Memory Used";
71+
case "memoryAllocs":
72+
return "Memory Allocs";
73+
case "configTime":
74+
return "Config Time";
6575
case "parseTime":
6676
return "Parse Time";
6777
case "bindTime":
@@ -82,6 +92,8 @@ const compilerSampleKeyToUnit = {
8292
symbols: "",
8393
types: "",
8494
memoryUsed: "k",
95+
memoryAllocs: "",
96+
configTime: "s",
8597
parseTime: "s",
8698
bindTime: "s",
8799
checkTime: "s",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function printBenchmark(benchmark: Benchmark, options: BenchmarkOptions,
2626
rowStyles: [
2727
"*",
2828
{ className: "group header", border: Border.single.updateFrom({ top: "double" }) },
29-
{ className: "body", match: (x: MeasurementPivot) => x.metric === "Parse Time", border: { top: "single" } },
29+
{ className: "body", match: (x: MeasurementPivot) => x.metric === "Config Time", border: { top: "single" } },
3030
{ className: "body", match: (x: MeasurementPivot) => x.metric === "Total Time", border: { top: "single" } },
3131
{
3232
className: "body",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function printComparison(
104104
},
105105
{
106106
className: "body",
107-
match: (x: MeasurementComparisonPivot) => x.metric === "Parse Time",
107+
match: (x: MeasurementComparisonPivot) => x.metric === "Config Time",
108108
border: { top: "single" },
109109
},
110110
{

0 commit comments

Comments
 (0)