Better formatting of metrics
This commit is contained in:
@@ -192,7 +192,7 @@ class JoinOrderScanner implements EvaluationLogScanner {
|
||||
private reportProblemIfNecessary(event: SummaryEvent, iteration: number, metric: number): void {
|
||||
if (metric >= this.warningThreshold) {
|
||||
this.problemReporter.reportProblem(event.predicateName, event.raHash, iteration,
|
||||
`Relation '${event.predicateName}' has an inefficient join order. Its join order metric is ${metric}, which is larger than the threshold of ${this.warningThreshold}.`);
|
||||
`Relation '${event.predicateName}' has an inefficient join order. Its join order metric is ${metric.toFixed(2)}, which is larger than the threshold of ${this.warningThreshold.toFixed(2)}.`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ describe('log scanners', function() {
|
||||
expect(problemReporter.problems[0].predicateName).to.equal('#select#ff');
|
||||
expect(problemReporter.problems[0].raHash).to.equal('1bb43c97jpmuh8r2v0f9hktim63');
|
||||
expect(problemReporter.problems[0].iteration).to.equal(0);
|
||||
expect(problemReporter.problems[0].message).to.equal('Relation \'#select#ff\' has an inefficient join order. Its join order metric is 4961.834409325194, which is larger than the threshold of 50.');
|
||||
expect(problemReporter.problems[0].message).to.equal('Relation \'#select#ff\' has an inefficient join order. Its join order metric is 4961.83, which is larger than the threshold of 50.00.');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user