Skip to content

Commit b24e151

Browse files
committed
ui: status: add reminder and total lines to the flakes
Looks like there is quite a few low rate flakes. Add a reminder line to flag those that don't qualify for frequent flaking. Also add a total / sum while at it. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 154bc4e commit b24e151

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

ui/status.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,18 @@ function branches_loaded(data_raw)
10051005
loaded_one();
10061006
}
10071007

1008+
function flakes_add_summary(table, name, data)
1009+
{
1010+
let row = table.insertRow();
1011+
let cell = row.insertCell(0);
1012+
cell.innerHTML = name;
1013+
cell.setAttribute("colspan", "3");
1014+
cell.setAttribute("style", "text-align: right; font-style: italic;");
1015+
for (let n = 0; n < 4; n++)
1016+
row.insertCell(n + 1).innerHTML = "<span style=\"font-style: italic;\">" + data[n] + "</span>";
1017+
row.insertCell(5).innerText = "";
1018+
}
1019+
10081020
function flakes_doit(data_raw)
10091021
{
10101022
let flakes = document.getElementById("flakes");
@@ -1019,13 +1031,22 @@ function flakes_doit(data_raw)
10191031
return 0;
10201032
})
10211033

1034+
let reminder = [0, 0, 0, 0];
1035+
let total = [0, 0, 0, 0];
1036+
10221037
$.each(data_raw, function(i, v) {
10231038
let row = flakes.insertRow();
10241039
let reported = nipa_pw_reported(v, v);
10251040
let ignored = "";
10261041

1027-
if (v["count"][0] + v["count"][1] + v["count"][2] < 4 && reported)
1042+
for (let n = 0; n < 4; n++)
1043+
total[n] += v["count"][n];
1044+
1045+
if (v["count"][0] + v["count"][1] + v["count"][2] < 4 && reported) {
1046+
for (let n = 0; n < 4; n++)
1047+
reminder[n] += v["count"][n];
10281048
return 1;
1049+
}
10291050
if (!reported)
10301051
ignored = "yes";
10311052

@@ -1038,6 +1059,9 @@ function flakes_doit(data_raw)
10381059
row.insertCell(6).innerText = v["count"][3];
10391060
row.insertCell(7).innerText = ignored;
10401061
});
1062+
1063+
flakes_add_summary(flakes, "reminder", reminder);
1064+
flakes_add_summary(flakes, "total", total);
10411065
}
10421066

10431067
function do_it()

0 commit comments

Comments
 (0)