mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 13:59:54 +02:00
Remove small differences
This commit is contained in:
@@ -17,11 +17,6 @@ const getRuntimes = (csv: string): RunTimes => {
|
|||||||
const [testName, timeTaken] = line.split(',');
|
const [testName, timeTaken] = line.split(',');
|
||||||
if (testName && timeTaken) {
|
if (testName && timeTaken) {
|
||||||
runtimes[testName] = Number(timeTaken);
|
runtimes[testName] = Number(timeTaken);
|
||||||
|
|
||||||
// TODO: Add some variation to test logging. Should remove.
|
|
||||||
// if (Math.random() < 0.3) {
|
|
||||||
// runtimes[testName] *= Math.random() * 2;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return runtimes;
|
return runtimes;
|
||||||
@@ -72,14 +67,15 @@ const main = async () => {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const delta = timeTaken - oldTimeTaken;
|
const delta = timeTaken - oldTimeTaken;
|
||||||
|
|
||||||
const { change, crossedThreshold } = percentageDifference(oldTimeTaken, timeTaken);
|
const { change, crossedThreshold } = percentageDifference(oldTimeTaken, timeTaken);
|
||||||
const out = [
|
const out = [
|
||||||
fileName,
|
fileName,
|
||||||
testName,
|
testName.replace('#', ''),
|
||||||
`${oldTimeTaken}/${timeTaken}`,
|
`${oldTimeTaken}/${timeTaken}`,
|
||||||
`${delta.toString()}ms ${change}`,
|
`${delta.toString()}ms ${change}`,
|
||||||
];
|
];
|
||||||
if (crossedThreshold) {
|
if (crossedThreshold && Math.abs(delta) > 25) {
|
||||||
changed.push(out);
|
changed.push(out);
|
||||||
}
|
}
|
||||||
fullData.push(out);
|
fullData.push(out);
|
||||||
|
Reference in New Issue
Block a user