Api feature request: tracking memory usage

Use case or problem

i am developing a plugin using high memory and even might make obsidian crash. i would like to track the memory usage of obsidian or the operating system

Proposed solution

an onsidian api returning the current device memory or obsidian memory including the plugin

Current workaround (optional)

unfortunately javascript itself doesn’t have universal native api. especially on mobile safari on ios. so no feasible workaround now. the possibility strictly relies on obsidian providing an api

more info: Performance: memory property - Web APIs | MDN