Dear Genodians,
I want to determine the total resources consumed within a deeply nested subsystem. The only apparent way to do this is to iterate through all the init state reports of the children and their ancestors down to the leaf and accumulate the respective `ram_used` and `caps_used` attributes of the `child` nodes. Is this the way?
Intuitively, the parent at the tree's root should be aware of this information. However, after digging through the documentation and the code, I found that this `total_ram_used`/`total_caps_used` information is not available out of the box within an init component/sandbox library. I assume the reason for this is that there is no (easy) way to communicate this information all the way back to the parent.
On the other hand, implementing a monitor component that goes through all these recursive init state reports, not knowing how deep the tree is, and assuming that all the sub-inits correctly report their state seems quite error-prone.
Is my assumption correct that the only way to determine a subsystem's resource consumption is to aggregate the init state reports down to the leaf?
Cheers, Sid