bin/cpubench: support benchmarks setting
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#=====================================================================
|
||||
[common]
|
||||
action = standard # options: standard, build, run, clean
|
||||
benchmarks = IntSingle,FloatSingle
|
||||
benchmarks = @@BENCHMARKS@@
|
||||
#IntSingle
|
||||
#benchmarks = x264,gcc,gzip,tpcc,tpch,velvet,openssl,rapidjson,python,xz
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ const cpubenchConfig = cpubench.renderConfig({
|
||||
...optimizeOptions({ optimize: argv.optimize as OptimizeOptions["optimize"] })
|
||||
],
|
||||
sysroot: argv.sysroot,
|
||||
benchmarks: argv.benchmarks as cpubench.CPUBenchConfigOptions["benchmarks"],
|
||||
});
|
||||
|
||||
const uuid = randomUUID();
|
||||
@@ -70,7 +71,6 @@ const systemdArgs = [
|
||||
path.resolve(cpubenchDir, 'cpubench.sh'),
|
||||
`--config=${configFile}`,
|
||||
"--skip_verify=1",
|
||||
...argv.benchmarks.map(x => `-b=${x}`),
|
||||
"--rebuild=1",
|
||||
"-i=1"
|
||||
];
|
||||
|
||||
@@ -5,11 +5,13 @@ export interface CPUBenchConfigOptions {
|
||||
llvmInstall: string;
|
||||
optimize: string[];
|
||||
sysroot: string;
|
||||
benchmarks: string[];
|
||||
}
|
||||
|
||||
export function renderConfig({ llvmInstall, optimize, sysroot }: CPUBenchConfigOptions) {
|
||||
export function renderConfig({ llvmInstall, optimize, sysroot, benchmarks }: CPUBenchConfigOptions) {
|
||||
return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n` + cpuBenchTemplate
|
||||
.replace('@@LLVM_INSTALL@@', llvmInstall)
|
||||
.replace('@@OPTIMIZE@@', optimize.join(' '))
|
||||
.replace('@@SYSROOT@@', sysroot);
|
||||
.replace('@@SYSROOT@@', sysroot)
|
||||
.replace('@@BENCHMARKS@@', benchmarks.join(','));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user