This is the code for the exercise in Java code introduction for beginners workshop.
The exercise is to build a simple profiler in java to test and see how instrumentation in java using works.
The workshop is presented in DevConf.us 2022.
There are three modules this project:
-
tested-app
A simple app that just writes to a log a constant message. It is used to test the profiler. -
profiler
A profiler agent that instruments the log method. You should work onh this folder to improve the profiler. It instruments the java.util.logging.Logger.log using JavaAssist. -
profiler-solution
A profiler agent that instruments the log method. This is a solution to the exercises given in the workshop. It instruments the java.util.logging.Logger.log using JavaAssist. -
riddles folder
The riddles folder contains two riddles that can be solved using the profiler. You can find there aREADME
file with the run instructions.
Build the project
mvn install
To execute the tested app without the profiler run
java -jar ./tested-app/target/tested-app-1.0.jar
To execute the tested app with the profiler run
java -javaagent:./profiler/target/profiler-1.0-jar-with-dependencies.jar -jar ./tested-app/target/tested-app-1.0.jar