Skip to content

Commit d8de96c

Browse files
committed
sort metrics alphabetically
1 parent 12f794b commit d8de96c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/plot_metrics.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ function plotMetrics() {
1616
counter.set(call, (counter.get(call) ?? 0) + 1);
1717
}
1818

19-
const data = Array.from(counter.entries()).map(([key, value]) => ({
20-
key,
21-
value,
22-
}));
19+
const data = Array.from(counter.entries())
20+
.map(([key, value]) => ({
21+
key,
22+
value,
23+
}))
24+
.sort((a, b) => a.key.localeCompare(b.key));
2325
const totalRuns = data.reduce((acc, item) => acc + item.value, 0);
2426

2527
type Item = { key: string; value: number };

0 commit comments

Comments
 (0)