Show on-disk statistics for reused/skipped runs in the series table

collectSeriesStatisticRows read entry.statistic, but plan entries place the
parsed MSR statistic on entry.classification.statistic, so skip/reuse rows
rendered as empty. Read the classification copy first (entry.statistic kept
as a fallback) so every selected data set reports the values already
extracted from its MSR, matching what is plotted.
This commit is contained in:
salman committed 2026-09-10 13:57:48 +02:00
1 parent 7ca50e1538
commit 59e6dd12ea
2 files changed
+25 -1

No files matched your search

+6 -1
View File
@@ -2638,7 +2638,12 @@ function applySeriesFitStatistic(rows) {
function collectSeriesStatisticRows(plan) {
if (!plan || !Array.isArray(plan.entries)) return [];
return plan.entries.map(function(entry) {
let stat = entry.statistic || {};
// The plan classifies every selected data set and caches its parsed on-disk
// statistic there; skip/reuse rows keep the values from the MSR used for
// plotting so the per-run table shows them too.
let classification = entry.classification || {};
let stat = classification.statistic && typeof classification.statistic === "object"
? classification.statistic : (entry.statistic || {});
return {
run: entry.run,
action: entry.action || "fit",
+19
View File
@@ -140,6 +140,25 @@ function testCollectSeriesStatisticRows(lib) {
assert.strictEqual(rows[1].action, "fit");
assert.strictEqual(lib.collectSeriesStatisticRows({ entries: [] }).length, 0);
assert.strictEqual(lib.collectSeriesStatisticRows(null).length, 0);
// Real plan entries carry the parsed on-disk statistic on classification,
// not on the entry itself. Reused/skipped rows must surface those values.
const reused = lib.collectSeriesStatisticRows({
entries: [{
run: 2537, action: "skip",
classification: {
statistic: { found: true, converged: true, kind: "chisq",
value: "0.87", ndf: "100", text: "χ²/NDF 0.87" }
},
msrPath: "/work/2537_asy.msr"
}]
})[0];
assert.strictEqual(reused.text, "χ²/NDF 0.87");
assert.strictEqual(reused.kind, "chisq");
assert.strictEqual(reused.value, "0.87");
assert.strictEqual(reused.ndf, "100");
assert.strictEqual(reused.found, true);
assert.strictEqual(reused.converged, true);
}
async function testSynchronizeSeriesStatistics(lib) {