зеркало из https://github.com/mozilla/bugbug.git
Use the average number of test failure bugs instead of the total
The total is bogus because when we sum bugs from e.g. a week, we might be summing the same bugs multiple times (while we should instead unite the sets of bugs, if we had their IDs).
This commit is contained in:
Родитель
e22e1981a7
Коммит
cf500d49d5
|
@ -1673,12 +1673,18 @@ export async function renderTestFailureStatsChart(chartEl) {
|
||||||
)[0]
|
)[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const days = new Set();
|
||||||
|
|
||||||
const summaryData = await getSummaryData(
|
const summaryData = await getSummaryData(
|
||||||
allTestStatsDays,
|
allTestStatsDays,
|
||||||
getOption("grouping"),
|
getOption("grouping"),
|
||||||
minDate,
|
minDate,
|
||||||
(counterObj, testStatsDay) => {
|
(counterObj, testStatsDay) => {
|
||||||
counterObj.bugs += testStatsDay[1].bugs;
|
counterObj.bugs += testStatsDay[1].bugs;
|
||||||
|
if (!days.has(testStatsDay[0])) {
|
||||||
|
counterObj.days += 1;
|
||||||
|
days.add(testStatsDay[0]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
(testStatsDay) => testStatsDay[0]
|
(testStatsDay) => testStatsDay[0]
|
||||||
|
@ -1688,7 +1694,7 @@ export async function renderTestFailureStatsChart(chartEl) {
|
||||||
const bugs = [];
|
const bugs = [];
|
||||||
for (const date in summaryData) {
|
for (const date in summaryData) {
|
||||||
categories.push(date);
|
categories.push(date);
|
||||||
bugs.push(summaryData[date].bugs);
|
bugs.push(Math.ceil(summaryData[date].bugs / summaryData[date].days));
|
||||||
}
|
}
|
||||||
|
|
||||||
renderChart(
|
renderChart(
|
||||||
|
@ -1700,7 +1706,7 @@ export async function renderTestFailureStatsChart(chartEl) {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
categories,
|
categories,
|
||||||
"Evolution of the number of test failure bugs (total in the time period)",
|
"Evolution of the number of active test failure bugs (average in the time period)",
|
||||||
"# of bugs"
|
"# of bugs"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче