+ All Categories
Home > Documents > Tibero 성능 테스트를 위한 LoadRunner 사용법 - Technet

Tibero 성능 테스트를 위한 LoadRunner 사용법 - Technet

Date post: 08-Jan-2023
Category:
Upload: khangminh22
View: 0 times
Download: 0 times
Share this document with a friend
10
기타 지식 Tibero 성능 테스트를 위한 LoadRunner 사용법 2014. 04. 10.
Transcript

기타 지식

Tibero 성능 테스트를 위한 LoadRunner

사용법

2014. 04. 10.

기타 지식

Better Technology, Better Tomorrow

2

목차

1. Loadrunner 소개 ................................................................................................................................................................................................ 3

1.1. Loadrunner 개요 ...................................................................................................................................................................................... 3

1.2. Loadrunner 구성 ...................................................................................................................................................................................... 3

1.3. Loadrunner 환경구성 ............................................................................................................................................................................. 4

2. LoadRunner 사용 예제 ................................................................................................................................................................................... 6

2.1. 사용 예제 (Native-Protocol Driver) ................................................................................................................................................ 6

기타 지식

Better Technology, Better Tomorrow

3

Tibero 성능 테스트를 위한 LoadRunner 사용법

1. Loadrunner 소개

1.1. Loadrunner 개요

Web 프로그램을 작성한 후 동시 접속자수가 얼마까지 가능한지 테스트하고, 성능에 대한 튜닝 작업이 필요한 경우가

많다. 이럴 경우 수십 명의 동료들을 동원하여 동시에 클릭하여 테스트를 진행하기도 하지만, 테스트가 단시간에 끝나

는 것도 아니고, 환경설정 정보를 수정한 후 다시 작업을 진행하기는 쉬운 일이 아니다. Loadrunner는 이러한 작업을

쉽게 1인이 1대 혹은 다수의 PC에서 테스트를 진행 할 수 있는 성능 테스트 Tool 중 하나이다. 이외에 JMETER 등이

있다.

1.2. Loadrunner 구성

LoadRunner Controller - 부하 테스트 시나리오 작성과 시스템 부하 생성 및 실행 제어

LoadRunner VUGen - 가상 사용자의 테스트 스크립트자동 생성 및 디버깅

LoadRunner Analysis - 부하 테스트 결과 자동 집계 및 성능 평가 메트릭스 자동 산출

기타 지식

Better Technology, Better Tomorrow

4

1.3. Loadrunner 환경구성

JAVA Vuser 사용 시 환경구성 설정 (LoadRunner VUGen)

- Run-time Settings부분에서 Java 환경설정(classpath,java VM)을 설정한다.

Classpath 설정

- Classpath 부분에 LoadRunner 하위 폴더의 Classeses 폴더 경로를 추가 한다.

기타 지식

Better Technology, Better Tomorrow

5

Classpath 부분에 jdbc 경로를 추가

Java VM 부분에서 JDK(JAVA_HOME) 경로를 추가

기타 지식

Better Technology, Better Tomorrow

6

2. LoadRunner 사용 예제

2.1. 사용 예제 (Native-Protocol Driver)

1) JDBC를 통한 LoadRunner 실행 후 Tibero TAC 가용성 테스트를 진행한다.

- 스크립트 생성(LoadRunner VUGen) -> 시나리오 작성(LoadRunner Controller) -> 실행 및 결과 분석

(LoadRunner Analysis)

2) 스크립트를 작성한다.

- LoadRunner VUGen 실행 -> 파일 -> New script and solution -> 카테고리 Vugen single Protocol 에서 Java Vuser

선택 후 스크립트 작성

import lrapi.lr;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

import java.sql.*;

public class Actions

{

private Connection connection;

public int init() throws Throwable {

// Initialize DB connection

return 0;

}//end of init

public int action() throws Throwable {

String FORMATTED_MESSAGE = null;

Statement stmt = null;

ResultSet rs = null;

connection = null;

try

{

lr.start_transaction("TEST_TX");

Class.forName("com.tmax.tibero.jdbc.TbDriver").newInstance();

String url

= "jdbc:tibero:thin:@(description=(failover=on)(address_list=(address=(host=192.168.5

1.171)(port=56629))(address=(host=192.168.51.172)(port=58629)))(DATABASE_NAME=TAC))";

stmt = connection.createStatement();

rs = stmt.executeQuery("select count(*) cnt from test_tac");

while (rs.next()) {

FORMATTED_MESSAGE = rs.getString("cnt");

//lr.message(FORMATTED_MESSAGE);

}

lr.end_transaction("TEST_TX",lr.PASS);

}

catch(Exception ex) {

기타 지식

Better Technology, Better Tomorrow

7

ex.printStackTrace();

lr.end_transaction("TEST_TX",lr.FAIL);

}

finally {

try{rs.close(); rs=null;} catch(Exception ex){}

try{stmt.close(); stmt=null;} catch(Exception ex){}

try{connection.close();connection = null;} catch(Exception ex){}

}

return 0;

}//end of action

public int end() throws Throwable {

// connection = null;

return 0;

}//end of end

}

시나리오 작성 (LoadRunner Controller)

- LoadRunner Controller 실행 -> New scenario -> Goal-Oriented Scenario (LoadRunner의 컨트롤러가 지정한

golas을 기반으로 시나리오를 구성) -> 스크립트를 추가한 후 OK 버튼 Click

기타 지식

Better Technology, Better Tomorrow

8

한쪽 Node를 Disconnect 한 후 Failover 테스트 진행

Transaction Per Second - 단위시간당 처리건수 그래프

- 한쪽 Node를 Disconnect 하면 그래프가 하향을 그리다가 다시 정상 상태 유지

- 네트워크 상황, 연결 상황에 따라 그래프 균일 정도가 다름.

(테스트 중 JDBC를 통한 재 접속 시 TPS 수치가 20배 이상 차이가 발생됨)

기타 지식

Better Technology, Better Tomorrow

9

실행 및 결과 분석(LoadRunner Analysis)

기타 지식

Better Technology, Better Tomorrow

10

Copyright © 2014 TmaxData Co., Ltd. All Rights Reserved. Trademarks Tibero RDBMS® is a registered trademark of TmaxData Co., Ltd. Other products, titles or services may be registered trademarks of their respective companies. Contact Information TmaxData can be contacted at the following addresses to arrange for a consulting team to visit your company and discuss your options.

Korea TmaxData Co., Ltd 5, Hwangsaeul-ro 329beon-gil, Bundang-gu, Seongnam-si, Gyeonggi-do. South Korea Tel: +82-31-779-7113 Fax: +82-31-779-7119 Email: [email protected] Web (Korean): http://www.tmaxdata.com Technical Support: http://technet.tmaxsoft.com USA TmaxSoft, Inc. 560 Sylvan Avenue Englewood Cliffs, NJ 07632. U.S.A Tel: +1-201-567-8266 Fax: +1-201-567-7339 Email: [email protected] Web (English): http://www.tmaxsoft.com Japan TmaxSoft Japan Co., Ltd. 5F Sanko Bldg, 3-12-16 Mita, Minato-Ku, Tokyo, 108-0073 Japan Tel: +81-3-5765-2550 Fax: +81-3-5765-2567 Email: [email protected] Web (Japanese): http://www.tmaxsoft.co.jp China TmaxSoft China Co., Ltd. Beijing Silver Tower, RM 1508, 2 North Rd Dong San Huan, Chaoyang District, Beijing, China, 100027. China Tel: +86-10-6410-6145~8 Fax: +86-10-6410-6144 Email: [email protected] Web (Chinese): http://www.tmaxsoft.com.cn Brazil TmaxSoft Brazil Avenida Copacabana, 177 - 3 andar 18 do Forte Empresarial, Alphaville - Barueri, Sao Paulo, SP-Brasil CEP 06472-001 Email: [email protected]

Russia Tmax Russia L.L.C. Grand Setun Plaza, No A204 Gorbunova st.2, Moscow, 121596 Tel: +7(495)970-01-35 Email: [email protected] Web (Russian): http://ru.tmaxsoft.com Singapore Tmax Singapore Pte. Ltd. 430 Lorong 6, Toa Payoh #10-02, OrangeTee Building. Singapore 319402 Tel: +65-6259-7223 Email: [email protected] United Kingdom TmaxSoft UK Ltd. Surrey House, Suite 221, 34 Eden Street, Kingston-Upon-Thames, KT1 1ER United Kingdom Tel: + 44-(0)20-8481-3776 Email: [email protected] Web (English): http:/www.tmaxsoft.com

TN-TRDV-D0410101


Recommended