pub fn assert_cross_node_migration(
migrated_pages: u64,
total_pages: u64,
max_ratio: Option<f64>,
) -> AssertResultExpand description
Check cross-node page migration ratio against threshold.
migrated_pages is the delta of /proc/vmstat numa_pages_migrated
between pre- and post-workload snapshots. total_pages is the total
allocated pages from numa_maps.
Inconsistent inputs (migrated_pages > 0 while total_pages == 0)
fail loudly: vmstat saw migrations the workload’s numa_maps did not
account for, which is either a measurement gap or an instrumentation
bug, and silently coercing the ratio to 0.0 would let the assertion
pass on data the operator should not trust.
When both inputs are zero (migrated_pages == 0 && total_pages == 0)
the gate records Inconclusive — the denominator is zero and the
check has no signal to evaluate; neither Pass (would silently green
a workload that produced no NUMA pages) nor Fail (no actual ratio
violation observed) is truthful.