Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to start a recording from source code?

the_qa_guyFeb 14 2014 — edited Feb 20 2014

Hi everybody!

I'm currently using JProfiler in combination with JUnit tests to collect resource consumption metrics of features in our product.

A homemade JUnit runner starts and stops the JProfiler recording and parses the recorded data. It then compares the recorded values to predefined limits and fails the test if they are exceeded.

Now I want to change this to use the flight recorder instead. I found a nice article explaining how to parse .jfr files here: Using the Flight Recorder Parsers | Marcus Hirt

Unfortunately I can't figure out how to start and stop a flight recording from a JUnit runner besides using the jcmd tool.

Can anybody help me out?

Thanks a lot

Tobias

This post has been answered by Hirt-Oracle on Feb 18 2014
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 20 2014
Added on Feb 14 2014
8 comments
3,476 views