I'm trying to test my app's behavior in various situations like let's say there's a lot of RAM and CPU being used or network being consumed by some other apps or battery being drained away by another.
Now, what I've is let's say I want (100-X)% of RAM to be used away(render unavailable) and my app has only X% to use, how can I simulate that and run my app in that condition?
Similarly, let's say I've only Y% of network available due to various other apps running on the system, now I want to render (100-Y)% of the network availability to be simulated and run my app in that condition.
CPU being busy for (100-Z)% and available only Z% of time for my app that I want to test.
These are the situations that I want to simulate. Can someone show me a tool or explain me a way to do this?