diff --git a/src/bin/cpubench.ts b/src/bin/cpubench.ts index 9c974c1..6f2ad65 100644 --- a/src/bin/cpubench.ts +++ b/src/bin/cpubench.ts @@ -27,6 +27,7 @@ const argv = await yargs(hideBin(process.argv)) demandOption: true }) .option('optimize', { + alias: 'o', type: 'string', description: 'Optimization level', choices: ['0', '1', '2', '3', 's', 'fast', 'g', 'z'], // 限制输入值为合法选项 @@ -34,6 +35,7 @@ const argv = await yargs(hideBin(process.argv)) }) .option('benchmarks', { type: 'array', // 数组类型参数 + alias: 'b', description: 'List of benchmarks to run', demandOption: true, })