Skip to content

Commit

Permalink
Improve performance logs
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jan 14, 2025
1 parent 3ea979e commit b5f4e63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/performance/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,9 @@ function compareSamples() {
const result1 = getResultsForSample(sample1);
const result2 = getResultsForSample(sample2);

// eslint-disable-next-line no-console
console.log("For current Player:\n" + "===================");
// eslint-disable-next-line no-console
console.log(
"\n==== For current Player ====\n",
`test name: ${testName}\n` +
`mean: ${result1.mean}\n` +
`variance: ${result1.variance}\n` +
Expand All @@ -584,10 +583,9 @@ function compareSamples() {
`moe: ${result1.moe}\n`,
);

// eslint-disable-next-line no-console
console.log("\nFor previous Player:\n" + "===================");
// eslint-disable-next-line no-console
console.log(
"\n==== For previous Player ====\n",
`test name: ${testName}\n` +
`mean: ${result2.mean}\n` +
`variance: ${result2.variance}\n` +
Expand Down Expand Up @@ -703,12 +701,14 @@ function getSamplePerScenarios(samplesObj) {
*/
function displayTemporaryResults() {
const testedScenarios = getSamplePerScenarios(currentTestSample);
// eslint-disable-next-line no-console
console.log(`\n\n==== Temporary results (${nextTaskIndex}/${tasks.length}) ====\n`);
for (const testName of Object.keys(testedScenarios)) {
const scenarioSample = testedScenarios[testName];
const results = getResultsForSample(scenarioSample);
// eslint-disable-next-line no-console
console.log(
`test name: ${testName}\n` +
`\ntest name: ${testName}\n` +
`mean: ${results.mean}\n` +
`first sample: ${scenarioSample[0]}\n` +
`last sample: ${scenarioSample[scenarioSample.length - 1]}\n` +
Expand Down

0 comments on commit b5f4e63

Please sign in to comment.