bin/cpubench: add option aliases
This commit is contained in:
@@ -27,6 +27,7 @@ const argv = await yargs(hideBin(process.argv))
|
|||||||
demandOption: true
|
demandOption: true
|
||||||
})
|
})
|
||||||
.option('optimize', {
|
.option('optimize', {
|
||||||
|
alias: 'o',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'Optimization level',
|
description: 'Optimization level',
|
||||||
choices: ['0', '1', '2', '3', 's', 'fast', 'g', 'z'], // 限制输入值为合法选项
|
choices: ['0', '1', '2', '3', 's', 'fast', 'g', 'z'], // 限制输入值为合法选项
|
||||||
@@ -34,6 +35,7 @@ const argv = await yargs(hideBin(process.argv))
|
|||||||
})
|
})
|
||||||
.option('benchmarks', {
|
.option('benchmarks', {
|
||||||
type: 'array', // 数组类型参数
|
type: 'array', // 数组类型参数
|
||||||
|
alias: 'b',
|
||||||
description: 'List of benchmarks to run',
|
description: 'List of benchmarks to run',
|
||||||
demandOption: true,
|
demandOption: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user