According to JAVA cmd Reference I can set maxage and/or maxsize of JFR recording but it doesn't work.
I've shared Intellij IDEA recording and compilation of scala using ant: Stats
For idea I had the following settings:
-XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=/home/ichaki/development/misc/stats/idea,maxage=1h,repository=/home/ichaki/development/misc/stats/idea,settings=profile
For ant:
-XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=/home/ichaki/development/misc/stats/scala-ant,maxage=120s,maxsize=200k,repository=/home/ichaki/development/misc/stats/scala-ant,settings=profile
Thanks!
Note: I want to make stat collection in envs with SSD's which are quite limited in size
Flight Recorder writes data in chunks to disk, about 12-15 Mb each by default, so it's not possible to set a maxsize below that threshold.