I have a main() method that essentially plays a game with some random elements in it. For a school project, I'm developing an algorithm to play the game and would like to measure the performance changes as I progress with the program. Thus, I need to iterate over main() a large number of times and record analytics data of each run.
What is the preferred method of doing this? I can, of course, embed the original contents of main() in a
Create a second class named
<your-main-classname>PerfTest, code a second static
main method in it and from the inner loop call
<your-main-classname>.main( args ).