bin/cpubench: add option aliases
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user