Linux under pressure measured how the project?

Introduction: Pressure measurement tools for jmeter, project maven projects.

1. Use the maven project labeled jar package

Note: application.yml configuration to be checked (the configuration may be run locally and is not the same, such as a database on what ip linux)
Modify pom.xml configuration, the packaging change jar, then add the build

 <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

Here Insert Picture Description

  • In the implementation of the project root directory mvn clean packageto package
    Here Insert Picture DescriptionHere Insert Picture Description
  • After completion of the command package, generating package jar file in the root directory of the target, and then uploaded to the jar package linux.
    Here Insert Picture Description

Installation Jmeter 2.Linux the template and create jmeter pressure measurement

  • Installation jmeter
    the jmeter uploaded to linux, then you can extract:
# xshell上传,需按装lrzsz:yum install lrzsz,输入rz即可选择上传文件
rz 
# 解压到指定路径下
tar -xzvf apache-jmeter-5.2.1.tgz /usr/local/jmeter
  • Once you've created the template (see how to create this project pressure measurement ), save the test plans for goods_list.jmx, and then upload it to the template on linux.
    Here Insert Picture Description

3. Pressure test project

  • Startup project
java -jar qixingcxy-shop.jar
  • The other from a window, press start jmeter be measured
    to the next / usr / local / jmeter, execute command pressure measurement (Note: The template goods_list also put / usr / local / jmeter directory)
# goods_list.jmx为压测模板,result.jtl为压测结果
./apache-jmeter-5.2.1/bin/jmeter.sh -n -t goods_list.jmx -l result.jtl

4. See pressure measurement results

  • The pressure measurement results are downloaded to the local result.jtl
sz result.jtl
  • Check the pressure test results with Jmeter
    Browse to select pressure measurement results result.jtl polymerization report, you can see the pressure measurement data.
    Here Insert Picture Description
Published 74 original articles · won praise 53 · views 70000 +

Guess you like

Origin blog.csdn.net/m0_37679452/article/details/104005756