beyond-sw-camp / be01-101

Beyond SW camp first player 101
17 stars 2 forks source link

Performance Measurement + TPS, vUser, nGrinder #9

Open pySatellite opened 5 months ago

pySatellite commented 5 months ago

nGrinder : https://naver.github.io/ngrinder/

image

STEP 1

java 설치(설치 되어 있다면 SKIP)

설치

설치 경로 확인

$ which java
# 결과 경로를 ls -l 로 심볼릭 경로의 원 경로를 찾기

vi ~/.zshrc 에 위 java 원 경로로 환경 변수 설정

# java env
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
export CLASS_PATH=$JAVA_HOME/lib:$CLASS_PATH

설정 적용 및 자바 설치 확인

$ source ~/.zshrc

$ java -version
java -version
openjdk version "11.0.21" 2023-10-17
OpenJDK Runtime Environment (build 11.0.21+9-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.21+9-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
pySatellite commented 5 months ago

STEP 2

ngrinder

$ pwd
~/app

$ tree
.
└── ng
    └── controller
        └── ngrinder-controller-3.5.8.war

2 directories, 1 file
$  cd ng/controller
$ java -jar ngrinder-controller-3.5.8.war

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.3.RELEASE)
.
.
.
2023-10-25 14:50:59,625 INFO  TomcatWebServer.java:220 : Tomcat started on port(s): 8080 (http) with context path ''
2023-10-25 14:50:59,634 INFO  StartupInfoLogger.java:61 : Started NGrinderControllerStarter in 16.156 seconds (JVM running for 17.014)
pySatellite commented 5 months ago

STEP 3

./run_agent.sh 실행

4 directories, 9 files $ pwd ~/app

$ cd ngrinder-agent $ ./run_agent.sh

pySatellite commented 5 months ago

STEP 4

$ sudo apt install net-tools
$ ifconfig -a | grep inet | grep broadcast
        inet <???.??.???.??>  netmask 255.255.240.0  broadcast 172.19.191.255
pySatellite commented 5 months ago

STEP 5

       @Test
    public void test() {
        HTTPResponse response = request.GET("http://172.19.182.28/index.html", params)

        if (response.statusCode == 301 || response.statusCode == 302) {
            grinder.logger.warn("Warning. The response may not be correct. The response code was {}.", response.statusCode)
        } else {
            assertThat(response.statusCode, is(200))
        }

                // 추가
        grinder.sleep(1000)
    }
pySatellite commented 5 months ago

STEP 6

image

pySatellite commented 5 months ago

CHECK

$ apache2ctl -V

$ pwd
/etc/apache2/mods-available
$ sudo cp mpm_event.conf mpm_event.conf.backup
$ sudo vi mpm_event.conf
# 파일 수정 후
$ sudo systemctl restart apache2
pySatellite commented 5 months ago

image

jsmin6330 commented 5 months ago
INAUGURATE-Ryong commented 5 months ago

image

parc02 commented 5 months ago
minu1215 commented 5 months ago
dana096 commented 5 months ago
choi3179 commented 5 months ago
Afresh2 commented 5 months ago
CoffeerLatte commented 5 months ago
dhkdtld37 commented 5 months ago

테스트 결과

image

qkralsgml78 commented 5 months ago

스크린샷 2024-01-26 172740

hyunsungJoo commented 5 months ago

image

pdh4869 commented 5 months ago
shimguh commented 5 months ago
Jaelinny commented 5 months ago

스크린샷 2024-01-26 173900

ae-chae commented 5 months ago
papercrane55123 commented 5 months ago
  • 테스트 결과 에러 2 -> 459 1
ldh0308 commented 5 months ago
Seull1 commented 5 months ago
INAUGURATE-Ryong commented 4 months ago

err

-p / --port=8080 port is already occupied by the other system or failed to bind. Please use the other port Usage: ngrinder [options] Options: -cm, --cluster-mode cluster-mode can be easy or advanced Default: none -c, --context-path context path of the embedded web application. Default: / -exh, --ex-home nGridner extended home directory -nh, --ngrinder-home nGridner home directory -p, --port HTTP port of the server. The default port is 8080. -help, -?, -h prints this message Default: false