Improve messages in benchmarking

This commit is contained in:
Sam Nolan 2022-04-26 14:30:03 -04:00
parent 60f3445277
commit 592bdbb9e9
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,10 @@ export function expectEqual(expression1: string, expression2: string) {
let result2 = testRun(expression2);
if (result1.tag === "number" && result2.tag === "number") {
let loss = getLoss(result1.value, result2.value);
console.log(`${result1.value} === ${result2.value}\nLoss: ${loss}`);
console.log(`${expression1} === ${expression2}`);
console.log(`${result1.value} === ${result2.value}`);
console.log(`loss = ${loss}`);
console.log(`logloss = ${Math.log(loss)}`);
}
}

View File

@ -8,6 +8,7 @@
"start": "rescript build -w -with-deps",
"clean": "rescript clean",
"test:reducer": "jest __tests__/Reducer*/",
"benchmark": "ts-node benchmark/conversion_tests.ts",
"test": "jest",
"test:ts": "jest __tests__/TS/",
"test:rescript": "jest --modulePathIgnorePatterns=__tests__/TS/*",