@@ -1,12 +1,13 @@
|
||||
import * as path from 'path';
|
||||
import * as fs from "fs";
|
||||
import { promisify } from "util";
|
||||
import { ChildProcessByStdio } from 'child_process';
|
||||
import { Readable, Writable } from 'stream';
|
||||
import { createInterface } from 'readline';
|
||||
import { SPECBenchData, benchpath, exepath, buildpath } from './benchData.js';
|
||||
import specTemplate from '../../assets/specTemplate.cfg';
|
||||
import assert from 'assert';
|
||||
import { ChildProcessByStdio, spawn } from 'child_process';
|
||||
import * as fs from "fs";
|
||||
import * as path from 'path';
|
||||
import { createInterface } from 'readline';
|
||||
import { Readable, Writable } from 'stream';
|
||||
import { promisify } from "util";
|
||||
import specTemplate from '../../assets/specTemplate.cfg';
|
||||
import { RunCPUOptions, runcpuOptions } from '../commands/spec.js';
|
||||
import { SPECBenchData, benchpath, buildpath, exepath } from './benchData.js';
|
||||
|
||||
|
||||
|
||||
@@ -211,3 +212,27 @@ export function parseSPECCSVResultsTable(data: string): ParsedResult {
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
export async function spawnSPECWithID(
|
||||
spec: SPEC,
|
||||
specConfig: ConfigOptions,
|
||||
runcpuConfig: RunCPUOptions,
|
||||
outputPath: string,
|
||||
id: string,
|
||||
) {
|
||||
const outputRoot = path.resolve(outputPath, id);
|
||||
|
||||
console.log(`runspec: launch SPEC benchmark at ${id}, config: ${JSON.stringify(specConfig)}`);
|
||||
console.log(`runspec: view output dir: ${outputRoot}`);
|
||||
|
||||
const config = `${id}.cfg`;
|
||||
|
||||
await spec.newConfig(config, renderConfig(specConfig));
|
||||
|
||||
return spawn('runcpu', runcpuOptions({
|
||||
outputRoot,
|
||||
config,
|
||||
...runcpuConfig,
|
||||
}), { env: spec.getEnvironment() });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user