Skip to content

Commit

Permalink
fix test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
doehyunbaek committed Aug 16, 2024
1 parent 0b30651 commit a59da57
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion evaluation/get_benchmark_fidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_subset_fidx(testname: str) -> list:
subset_of_fidx = []
try:
subprocess.run(
[f"{WASMR3_PATH}/target/release/slice_dice", replay_wasm_path],
[f"{WASMR3_PATH}/crates/target/release/slice_dice", replay_wasm_path],
check=True,
capture_output=True,
text=True,
Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/test-slice-dice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export default async function runSliceDiceTests(names: string[], options) {
function runSliceDice(replayWasmPath: string, fidx: string) {
const startTime = Date.now();
process.stdout.write(' Running slice-dice: ');
const command = `./target/release/slice_dice ${replayWasmPath} ${fidx} 1`;
const command = `./crates/target/release/slice_dice ${replayWasmPath} ${fidx} 1`;
execSync(command);
const endTime = Date.now();
// We do not actually check what's generated runs to completion. This is misleading.
// TODO: check for completion
console.log(`${endTime - startTime}ms`);
}

// TODO: this got slower by 2x from 01b34a3952ea29706d29d29d07b6f5148e119065. Investigate why.
async function runWasmR3(options: any, subsetPath: string, benchmarkPath: string, fidx: string) {
const startTime = Date.now();
process.stdout.write(' Running wasm-r3: ');
Expand Down Expand Up @@ -78,7 +79,7 @@ function getSubsetFidx(replayWasmPath: string, name: string) {
try {
} catch (e) {
}
const command = `./target/release/slice_dice ${replayWasmPath}`;
const command = `./crates/target/release/slice_dice ${replayWasmPath}`;
const stdout = execSync(command, { stdio: ['pipe', 'pipe', 'ignore'] });
const matches = stdout.toString().match(/\d+/g);
if (matches) {
Expand Down
3 changes: 2 additions & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ async function analyzeAndSaveBenchmark(options: any, testJsPath: string, website
path.join(process.cwd(), "benchmarks")
);
if (options.testcases !== undefined) {
testNames = testNames.filter((n) => options.testcases === (n));
testNames = testNames.filter((n) => options.testcases.includes(n));
testNames = Array.from(new Set([...testNames, ...options.testcases]));
}
await runSliceDiceTests(testNames, options);
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/wizard-engine

0 comments on commit a59da57

Please sign in to comment.