What a computation actually runs, for a test that checks a closure
(Roux.Code.closure/2) against it: every module the computation
executes must be in the closure of the roots its code version is
made of, or an edit to that module would leave stale results in
place.
{_result, ran} = Roux.Code.Verify.executed(fn -> MyGraph.extract(db, key) end)
{:ok, closure} = Roux.Code.closure([MyGraph.Extraction])
assert ran -- Enum.map(closure, &elem(&1, 0)) == []Call counts are kept per VM, not per process: anything else the VM
runs meanwhile counts too. Run it in a VM of its own (:peer).
Summary
Functions
Runs fun with call counting on, and returns its result with the
modules it called into, sorted.