Skip to content

Commit 4fd59a4

Browse files
committed
feat(benchmark): Adds version argument to benchmark script #335
1 parent 18a6d33 commit 4fd59a4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

benchmark/suite.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ const fetchModule = async (version) => {
109109
return mod.namespace;
110110
};
111111

112-
const main = async () => {
113-
const compareToVersion = 'v1.13.0';
114-
112+
const main = async (compareToVersion = 'latest') => {
115113
const results = await runSuites([
116114
{ module: psl, version: 'source' },
117115
{ module: await fetchModule(compareToVersion), version: compareToVersion },
@@ -120,7 +118,7 @@ const main = async () => {
120118
printResults(results, compareToVersion);
121119
};
122120

123-
main().catch((error) => {
121+
main(process.argv[2]).catch((error) => {
124122
console.error(error);
125123
process.exit(1);
126124
});

0 commit comments

Comments
 (0)