Stress test tool Apache JMeter: 10: distributed pressure sensed image JMeter

Original: stress test tool Apache JMeter: 10: distributed pressure sensed image JMeter

Here Insert Picture Description
Apache JMeter is a pure Java open-source software for load testing or performance testing. The article describes the construction and use as the basis of how to use JMeter Alpine mirrored this article to build a more easy to use JMeter mirrored on this basis.

JMeter based mirroring of Alpine

JMeter mirroring on introduction and use on the basis of the Alpine, you can see the following:

  • https://blog.csdn.net/liumiaocn/article/details/101919657

Based on the measured ambient pressure distributed container

In the container of the pressure sensing JMeter distributed create an environment defined by a compression dynamometer JMX content, by exchanging data volume, using the Master node assignment operation, sensing operation of the specific pressure on the content Slave node. A very simple one can see the main multi FIG distributed pressure from the vessel measurement of the environment.
Here Insert Picture Description

Distributed pressure measurement mirror

When using JMeter distributed stress test, we need to know at least the following settings:

Slave nodes

  • IP information machine is located
  • Port information associated with the master node

Master node

  • Slave node list information (including IP and PORT)

Construction Example of non-pressure container and execution environment can be measured with reference to the following, in order to deepen the understanding of this:

  • https://blog.csdn.net/liumiaocn/article/details/101638943

Dockerfile content

###############################################################################
#
#IMAGE:   JMeter(Alpine)
#VERSION: 5.1.1
#BASE:    Alpine 3.10.2
#
###############################################################################
FROM alpine:3.10.2

###############################################################################
#MAINTAINER
###############################################################################
MAINTAINER LiuMiao <[email protected]>


###############################################################################
#ARG Setting
###############################################################################
ARG VERSION_JMETER="5.1.1"

###############################################################################
#ENV Setting
###############################################################################
ENV FILENAME_JMETER      apache-jmeter-${VERSION_JMETER}
ENV HOME_JMETER          /usr/local/${FILENAME_JMETER}
ENV DOWNLOAD_URL_JMETER  https://archive.apache.org/dist/jmeter/binaries/${FILENAME_JMETER}.tgz
ENV DOWNLOAD_DIR_LOCAL   /tmp/download
ENV PATH                 $PATH:${HOME_JMETER}/bin

###############################################################################
#Install && Setting
###############################################################################
RUN apk update                                       \
    && apk upgrade                                   \
    && apk add --update openjdk8-jre curl unzip bash \
    && mkdir -p /tmp/download                        \
    && curl -L --silent ${DOWNLOAD_URL_JMETER} >  ${DOWNLOAD_DIR_LOCAL}/${FILENAME_JMETER}.tgz  \
    && mkdir -p /opt  ${DOWNLOAD_DIR_LOCAL}          \
    && tar -xzf ${DOWNLOAD_DIR_LOCAL}/${FILENAME_JMETER}.tgz -C /usr/local  \
    && rm -rf /var/cache/apk/*                       \
    && rm -rf ${DOWNLOAD_DIR_LOCAL}

###############################################################################
#Prepare Setting
###############################################################################
#COPY    entrypoint.sh /
WORKDIR	${HOME_JMETER}/bin

# ENTRYPOINT ["/entrypoint.sh"]

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49

Note: Content of EasyPack put under github, might follow a more simple encapsulation functions required by entrypoint.sh more convenient to use, but this is currently the most convenient way already be used to construct the container of JMeter distributed environment of the pressure test.

Mirror Download

liumiaocn:~ liumiao$ docker pull liumiaocn/jmeter:5.1.1
5.1.1: Pulling from liumiaocn/jmeter
9d48c3bd43c5: Already exists 
b2da696b9ce3: Pull complete 
Digest: sha256:bd7bb96d90b5ac7c8f72f147fc0b063bf845aa5f8daee48a1c525a1479d27d91
Status: Downloaded newer image for liumiaocn/jmeter:5.1.1
liumiaocn:~ liumiao$ docker images |grep jmeter |grep 5.1.1 |grep liumiaocn
liumiaocn/jmeter                                5.1.1                           9e0fdc73a1d9        8 hours ago         190MB
liumiaocn:~ liumiao$ 

  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

JMeter Slave node startup method

Start command examples:
Docker RUN Expediting IT -p 31099: 1099 JMeter JMeter -Dserver.rmi.ssl.disable to true -s = -j /tmp/jmeter-slave.log

JMeter Master node invoke a method

Master node can only start when the call (necessary beforehand to prepare jmx files), start the sample command is shown below

Start command examples:
Docker Expediting IT -v $ RUN (pwd) / Data: / Data JMeter JMeter -n -t = /data/httprequest.jmx to true -l -R & lt 192.168.31.242:31099 -Dserver.rmi.ssl.disable /tmp/jmeter-result.jtl -j /tmp/jmeter-test.log

Guess you like

Origin www.cnblogs.com/lonelyxmas/p/12205367.html