diff --git a/packages/squiggle-lang/benchmark/lib.ts b/packages/squiggle-lang/benchmark/lib.ts index 382d2d54..7049d62c 100644 --- a/packages/squiggle-lang/benchmark/lib.ts +++ b/packages/squiggle-lang/benchmark/lib.ts @@ -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)}`); } } diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index e9e77766..7542e8ff 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -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/*",