UE4’s profiling system is pretty good, but if you’re trying to profile the early stages of your game’s lifecycle, having to enter the console command stat startfile is a pain, and usually, you’ve already missed the thing you’re interested in capturing.
To get the command to run as soon as possible, you can add
-execcmds="stat startfile" as a command line parameter, and it’ll start as soon as the Stats Thread has initialised.