jvm-profiling-tools / honest-profiler

A sampling JVM profiler without the safepoint sample bias
https://github.com/RichardWarburton/honest-profiler/wiki
MIT License
1.25k stars 146 forks source link

Create Log Generator #203

Open PhRX opened 7 years ago

PhRX commented 7 years ago

For testing it would be extremely useful to have a java class which can generate binary log files through some API. In other words, I'd like to have a class for unit testing which can add the various kinds of "events" which can be emitted by the agent.

The idea would be to construct, in the tests, specific stacks and feed it into a hpl file, which can then be read by the test. Then, the resulting statistics would be known by design, and the test can properly check for the expected output.