With AOP and Java instrument, Java has a lot of good performance monitoring tools that can help us analyze system bottlenecks effectively. For example, using JVISUALVM GUI to connect the JVM application can monitor the various states of the application, you can see the execution time of each function, but many times we do not have JVISUALVM GUI to help debug, this time I prefer to use Javasimon, The service layer method call time can be monitored through an AOP configuration, the JDBC call time is monitored, and the time required for the Web HTTP request can be monitored, with the web dashboard intact. Let's talk about how to use Java Simon in spring related projects.
For more details, refer to http://blog.csdn.NET/cloud_ll/article/details/43603241
Javasimon is mainly used for performance testing when viewing system bottlenecks, if you want to achieve real-time monitoring of the system, we recommend the use of Yahoo Metrics
Reference Javasimon dependencies:
[HTML]View PlainCopy
- <dependency>
- <groupId>org.javasimon</groupId>
- <artifactid>javasimon-spring</artifactid>
- <version>${project-javasimonversion}</version>
- </Dependency>
- <dependency>
- <groupId>org.javasimon</groupId>
- <artifactid>javasimon-console-embed</artifactid>
- <version>${project-javasimonversion}</version>
- </Dependency>
- <dependency>
- <groupId>org.javasimon</groupId>
- <artifactid>javasimon-jdbc4</artifactid>
- <version>${project-javasimonversion}</version>
- </Dependency>
- <dependency>
- <groupId>org.javasimon</groupId>
- <artifactid>javasimon-javaee</artifactid>
- <version>${project-javasimonversion}</version>
- </Dependency>
Data Source Monitoring:
[HTML]View PlainCopy
- <Bean id= "realhikaricpdatasource" class="Com.zaxxer.hikari.HikariDataSource " destroy-method="Shutdown">
- <constructor-arg ref="hikariconfig" />
- </Bean>
- <Bean id= "hikaricpdatasource" class="Org.javasimon.jdbcx4.WrappingSimonDataSource" >
- <property name= "dataSource" ref="Realhikaricpdatasource"/>
- </Bean>
Java simon--Performance Bottleneck analysis tool