profiler: dedupe redundant record-count failure in check report
A record file with both a numRecords metadata check and record content checks reported the same count mismatch twice (numRecords and content.records). profilerRunRule now omits the content.records line when the numRecords check already covers it, keeping it only when no numRecords check ran (FCP/FCI 'type' mode or numRecords cleared) or when numRecords passes but the read returns a different count. 3 new tests. SW cache v58 -> v59.
This commit is contained in:
+4
-1
@@ -7642,7 +7642,10 @@ async function profilerRunRule(r) {
|
||||
const n = Math.min(exp.length, act.length);
|
||||
if (exp.length !== act.length) {
|
||||
res.status = 'fail';
|
||||
res.checks.push({ label: 'content.records', expected: exp.length + ' records', actual: act.length + ' records', ok: false });
|
||||
const numRec = res.checks.find(c => c.label === 'numRecords');
|
||||
if (!numRec || numRec.ok) {
|
||||
res.checks.push({ label: 'content.records', expected: exp.length + ' records', actual: act.length + ' records', ok: false });
|
||||
}
|
||||
}
|
||||
const matched = [];
|
||||
for (let j = 0; j < n; j++) {
|
||||
|
||||
Reference in New Issue
Block a user