How jmeterjmeter works

Source: Internet
Author: User

I have posted a blog post about how jmeter is used. I will try again later. Jmeter in addition to get information from the official website (http://jmeter.apache.org), I also read the jackei blog, very helpful, recommended

Http://www.cnblogs.com/jackei/category/32808.html

First, list the features I have used:

1. thread group

 

2. Http cookie Manager

 

 

3. HTTP header Manager

 

 

4. http request defaults

 

 

5. Random Variable

 

 

6. CSV Data Set config

 

 

7. http request httpclient

 

The retrieve all embedded resources from HTML files option can be selected to download non-HTML content. For details, seeHttp://www.cnblogs.com/jackei/archive/2012/01/05/557160.html

8. view results tree

 

 

9. perfmon metrics collector, can be used to collect CPU/memory information, see the http://code.google.com/p/jmeter-plugins/wiki/PerfMon for details

 

 

10. Generate Summary Results

 

 

Previously mentioned that jmeter GUI is not powerful, generally use non-Gui command line, since it is a free tool can also accept, do not know whether the new version 2.6 has improved (http://jmeter.apache.org/changes.html)

Use the command./jmeter-n-t DE-Test.jmx alone or not very powerful, you can use shell to write a script

# ! /Bin/bash
#
# Copyright 2010 XXX reserved.
# Author: Oscar Xie

CD/XXX/loadtest/bin
# Jmeter_bin = http://www.cnblogs.com/jmeter-2.3.4/bin/ApacheJMeter.jar
Jmeter_bin = ../jakarta-jmeter-2.4/bin/apachejmeter. Jar
Loadtest_dir = ../
Jmx_file = $ Loadtest_dir // Bin/DE-Test.jmx
Loadtest_bin_dir = $ Loadtest_dir /Bin
Url_file = $ Loadtest_dir /Bin/url.csv

Result_dir =/XXX/results
Log_dir =$ Result_dir/Log
Jtl_dir =$ Result_dir/Jtl
Stats_dir =$ Result_dir/Stats
Jppm_dir =$ Result_dir/Perf

#Rm-RF $ result_dir
Mkdir-P$ Result_dir
Mkdir$ Log_dir $ Jtl_dir $ Stats_dir $ Jppm_dir

Jvm_args ="-Xms3072m-xmx3072m-dpropname = propvalue"

Runjmeter (){
User = $1
LOG_FILE = $ Log_dir /'Hostname'-loadtest. $ User . Log
Rm -F $ LOG_FILE
Jtl_log = $ Jtl_dir /'Hostname'-loadtest. $ User . Jtl
Rm -F $ Jtl_log
Jppm_file = $ Jppm_dir /'Hostname'-loadtest. $ User -Perf. jtl
Rm -F $ Jppm_file
$ Jmeter_bin -- Nongui -- testfile $ Jmx_file -- Logfile $ LOG_FILE -Jjppmfile = $ Jppm_file \
-- Jmeterproperty threadcount = $ User \
-- Jmeterproperty loadtestlog = $ Jtl_log \
-- Jmeterproperty urlfile =$ Url_file \
-- Jmeterproperty loadperflog = $ Jppm_file \
-- Jmeterproperty duration= 300 \
-- Jmeterproperty adclienthost = xxx. MACHINE \
-- Jmeterproperty adclientport = 80 \
-- Jmeterproperty urlfile = $ Url_file
}

Stats_generator_jar =$ Loadtest_bin_dir/Lib/jmeterlogtostats_deploy.jar
Stats_html_dir = ../

Generatejmeterstats (){
Java-jar $ Stats_generator_jar \
-- Loadtest_jtl_dir = $ Jtl_dir \
-- Loadtest_stats_dir = $ Stats_dir \
-- Loadtest_html_dir = $ Stats_html_dir \
-- Csv_filename_pattern = " . *-Loadtest. ([0-9] +). jtl " \
-- Stats_filename_pattern = " . *-Loadtest. ([0-9] +). Stats "
}

Running jmeter 100
Running jmeter 400
Running jmeter 700
Running jmeter 1000
Running jmeter 1500
Running jmeter 2000

#Java-jar $ stats_generator_jar -- loadtest_jtl_dir = $ jtl_dir -- loadtest_stats_dir = $ stats_dir -- loadtest_html_dir = $ stats_html_dir
Generatejmeterstats
CP$ Loadtest_dir/Loadtest.html$ Result_dir 

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.