You test the game on hundreds of machines and thousands of VMs with all variations of all settings and you profile its resource usage and performance. Then you look at all the collected data and analyze it.
It's not exactly suitable for an indie developer to do.
Is there a program or library that can just test your program and see the memory usage and processor? I don't think I would be able to test my game on hundreds of PCs.