Skip to content

Commit

Permalink
fix: ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
uki00a committed Oct 21, 2023
1 parent 06819d9 commit 1803076
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/format-benchmark-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ function makeTableRow(columns) {
}

const resultsDir = new URL("../tmp/benchmark", import.meta.url);
for await (const entry of Deno.readDir(resultsDir)) {
const results = JSON.parse(
await Deno.readTextFile(join(resultsDir.pathname, entry.name)),
);
const paths = Array.from(Deno.readDirSync(resultsDir)).map((x) =>
join(resultsDir.pathname, x.name)
).sort();
for (const path of paths) {
const results = JSON.parse(await Deno.readTextFile(path));
const markdown = formatResultsAsMarkdown(results);
console.log(markdown);
}

0 comments on commit 1803076

Please sign in to comment.