gintool / gin

GI in No Time - a Simple Microframework for Genetic Improvement
MIT License
43 stars 21 forks source link

Profiling / project JVM args conflict #99

Open sandybrownlee opened 9 months ago

sandybrownlee commented 9 months ago

If a project's build file sets the JVM args this can stop the profiling working.

Trace included a warning about this for hprof:

            Logger.error("Error reading trace file: " + hprofFile);
            Logger.error("One possible cause of this error is if build files are setting the argLine parameter");
            Logger.error("grep through files for \"argLine\" to check.");
            Logger.trace(e);
            System.exit(-1);

but not for JFR. Either fix the clash, or at least add a warning for JFR.

sandybrownlee commented 5 months ago

There doesn't seem to be an API way to add to these. An argline in pom.xml overrides anything specific led programmatically...

One possible fix is a preprocessing tool, which scans the project for pom.xml files. These can then be copied and amended to remove argline elements, which Gin could then inject when running junit.

This might also include removing apache rat checking if file tree as gin's output files make that throw errors too.