JAMON API Setup – Notes

http://jamonapi.sourceforge.net/

Download latest copy and install the jar file to maven repository
mvn install:install-file -Dfile=x:downloadjamonjamonapi_2.7jamon-2.7.jar -DgroupId=com.jamonapi -DartifactId=jamon -Dversion=2.7 -Dpackaging=jar -DgeneratePom=true

Add this dependency to pom file

<dependency>
	<groupId>com.jamonapi</groupId>
	<artifactId>jamon</artifactId>
	<version>2.7</version>
	<scope>provided</scope>
</dependency>

Add this to .java file where you want to measure the performance

import com.jamonapi.Monitor;
import com.jamonapi.MonitorFactory;

In method begenning add

Monitor mon = MonitorFactory.start("XYZ:Method Name");

In method ending add

mon.stop();

Identify place to get all above times and print them at the end of program
Print in .html file to see nice report.

String fileData = MonitorFactory.getReport();
Log.info("Performance Report==>"+fileData);

-end-

2 thoughts on “JAMON API Setup – Notes

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.