Javamelody of performance testing for Java EE project

Source: Internet
Author: User
Tags glassfish

Time is urgent, the following is paste, to see the original please click with me

It is not a stress test tool that simulates requests like jmeter, but rather a tool that measures and calculates operational information on an application, that is, it is only responsible for monitoring the behavior and is not responsible for triggering the action. Javamelody generates simulation graphs based on request statistics and provides the following help for our application in QA or development:

1 gives the average response time and the number of executions

2 hints before certain operational trends become severe

3 Optimized response

4 Finding the root of the response bottleneck

5 Verify the effectiveness of the optimization strategy

JDK version requirements: Requires Java JDK at 1.6 or more than 1.6.  

Supports deployment and monitoring of the following application servers:

Servlet API is above 2.4

Tomcat 5.5 6 or 7

GlassFish v2 or v3

JBoss 4,5,6,7

Jonas 4 or 5

Jetty 6 or 7

WebLogic 9,10,11

If you want to monitor other servers need to install some plug-ins , read more Userguide

The best browser to use is Firefox chrome or IE9

Installing the test javamelody requires a web app, a Javamelody war package, and two jar packages.

1 Web Apps : Here's a simple example, a Web project that contains a index.html

2 Javamelody.war: These files can be downloaded on Google, but considering some FQ friends, it is stored in the Baidu cloud.

Javamelody.war This is the app package used for deployment

Javamelody.zip This contains the Userguide user manual and the source code

3 required two jar packages , located inside the zip package.

4 application packages used in the test are also put here.

It is important to note that Javamelody monitoring is very simple and deployment is fast. Usually the whole of javamelody and application is automatically completed by the software and does not require any action by the user. You only need to modify a little configuration file. Monitoring and application integration is typically no more than 10 seconds, and is usually automatically discovered by the compiled environment: You need to do the knowledge to copy two jar packages, add 10 lines of XML code. If the application you are publishing is not a relative directory, but a war package, then you need to read the following chapters below. If it is ear (EJBs), then you need to read some of the following User Guide advanced content.

1 jar Package

There are two jar packages in Javamelody.zip, one is Javamelody.jar and the other is Jrobin-x.jar. Copy the two jar packages to the Web-inf/lib directory in the webapp corresponding to the war package. Or use Maven to add Javamelody-core dependent file pom.xml.

  2 Web. xml file

If your SERVLETAPI is 3.0, want to TOMCAT7 GlassFish v3 jboss6 and so on, then you need to configure the XML. Otherwise, you need to add the following filter to the Web. Xml that applies the war package

1 <filter> 2 <filter-name>monitoring</filter-name> 3 <filter-class>net.bull.javamelody.mon Itoringfilter</filter-class> 4 </filter> 5 <filter-mapping> 6 <filter-name>monitoring</ Filter-name> 7 <url-pattern>/*</url-pattern> 8 </filter-mapping> 9 <listener>10 <lis Tener-class>net.bull.javamelody.sessionlistener</listener-class>11 </listener>

  

If you are servlet3.0, you also need to add <async-supported>true</async-supported> to support asynchronous requests

You can now start the application server to open the URL to view the monitoring effect. Website:http://

1 

Attention:

If an error occurs during startup, the error message contains window server, so check to see if you are using a different version of the server. and add system Parameters-djava.awt.headless=true

If the amount used is Tomcat, then add the java.awt.headless=true in the Conf/catalina.properties

Then restart the server.


Javamelody of performance testing for Java EE project

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.