Skip to content

Commit

Permalink
Revert "refactor: guard benchmark against empty input code when repar…
Browse files Browse the repository at this point in the history
…sing"

This reverts commit bb856d5.
  • Loading branch information
EagleoutIce committed Aug 4, 2023
1 parent bb856d5 commit acfdc48
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/benchmark/stats/summarizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,9 @@ export async function summarizeSlicerStats(stats: SlicerStats, report: (criteria
dataflowNodes: perSliceStat.numberOfDataflowNodesSliced
}))
} catch(e: unknown) {
if(output.length === 0) {
reductions.push(calculateReductionForSlice(stats.input, stats.dataflow, {
lines: lines,
characters: output.length,
nonWhitespaceCharacters: nonWhitespace,
autoSelected: autoSelected,
tokens: 0,
normalizedTokens: 0,
dataflowNodes: perSliceStat.numberOfDataflowNodesSliced
}))
} else {
console.error(` ! Failed to re-parse the output of the slicer for ${JSON.stringify(criteria)}`) //, e
console.error(` Code: ${output}\n`)
failedOutputs++
}
console.error(` ! Failed to re-parse the output of the slicer for ${JSON.stringify(criteria)}`) //, e
console.error(` Code: ${output}\n`)
failedOutputs++
}

sliceSize.dataflowNodes.push(perSliceStat.numberOfDataflowNodesSliced)
Expand Down

0 comments on commit acfdc48

Please sign in to comment.