1 Swingbench 簡(jiǎn)述
1.1 概述
這是Oracle UK的一個(gè)員工在一個(gè)被拋棄的項(xiàng)目的基礎(chǔ)上開(kāi)發(fā)的。目前穩(wěn)定版本2.2,最新版本2.3,基于JDK1.5。該工具是免費(fèi)的,可以在作者的網(wǎng)站上自由下載,并且擁有詳細(xì)的使用文檔。除了Swingbench,作者還開(kāi)發(fā)了兩個(gè)相關(guān)工具:測(cè)試數(shù)據(jù)生成工具DataGenerator和跟蹤文件分析工具Trace Analyzer。-
Swingbench可以執(zhí)行4種不同的標(biāo)準(zhǔn)測(cè)試(benchmark),擁有三種前端展示方式Swingbench/Charbench/Minibench,其中Charbench是字符模式的,另外兩種是GUI模式的。另外還可以通過(guò)ClusterOverview可以聚合顯示所有的結(jié)果。
Swingbench的開(kāi)發(fā)目的主要是用來(lái)展示RAC的負(fù)載和測(cè)試,但也可用于單實(shí)例環(huán)境。最新的2.3版本開(kāi)始支持TimesTen內(nèi)存數(shù)據(jù)庫(kù)。
下載地址:http://www.dominicgiles.com/downloads.html
文檔地址:http://www.dominicgiles.com/Swingbench.pdf
2 Swingbench for windows安裝
2.1 解壓swingbench壓力測(cè)試軟件
首先在作者網(wǎng)站上下載最新的2.3版本,文件名swingbench230422.zip,大小為9M左右
截壓在D:\swingbench230422\swingbench
解壓后目錄結(jié)構(gòu)如下圖所示:
swingbench (Top Level Directory, contains Swingbench.env)
|
+-- bin (Linux/Unix executables)
| |
| +-- sample (sample config files)
| |
| +-- data (data used by benchmarks)
| |
| +-- schema (xml schemas for config files)
|
+-- lib (Java Libraries i.e. *.jar)
|
+-- source (source code & build scripts for transactions)
|
+-- sql (sql scripts used by the wizards to create the schemas)
|
+-- winbin (Windows executables)
2.2 安裝JDK
因?yàn)檫\(yùn)行這個(gè)軟件需要java支持,我這里下載的jdk 1.5 for windows安裝包
介質(zhì)名為jdk-1_5_0-windows-i586.exe
2.3 安裝Oracle 10g 客戶端
因?yàn)樵趙indows下面是客戶端,需要安裝oci或jdbc連接到p595 aix服務(wù)器
介質(zhì)名為10201_client_win32.zip
2.4 配置環(huán)境變量swingbenchenv.bat如下所示:
REM Set the following to reflect the root directory of your Java installation
set JAVAHOME=C:\jdk15
REM Set the following to the directory where you installed swingbench
set SWINGHOME=D:\swingbench230422\swingbench
REM Set the following to the location of your TimesTen install (optional)
set TTHOME=C:\TimesTen\tt70
REM If you don't have the Oracle_HOME environment variable set uncomment the following and change it to reflect your environment
SET Oracle_HOME=F:\oracle\product\10.2.0\db_1
set ANTHOME=%SWINGHOME%\lib
set CLASSPATH=%JAVAHOME%\lib\rt.jar;%SWINGHOME%\lib\mytransactions.jar;%SWINGHOME%\lib\swingbench.jar;
REM The following is needed for 10g environments
set CLASSPATH=%CLASSPATH%;%Oracle_HOME%\jdbc\lib\ojdbc14.jar;%ORACLE_HOME%opmn\lib\ons.jar
REM The following is only needed for 11g environments
set CLASSPATH=%CLASSPATH%;%Oracle_HOME%\jdbc\lib\ojdbc5.jar
REM The following is only needed for TimesTen environments
set CLASSPATH=%CLASSPATH%;$TTHOME/lib/classes15.jar
3 配置swingbench 連接到數(shù)據(jù)庫(kù),創(chuàng)建表空間,用戶,表訂單等
3.1 配置tnsnames.ora文件
FSYYK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11.4.128.89)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 11.4.128.91)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = fsyyk)
)
)
3.2 運(yùn)行$SWINGHOME/winbin目錄下的oewizard.bat文件
輸入jdbc或oci連接方法
jdbc為//主機(jī)名或ip地址:1521/sid或services_name
oci為tnsnames.ora中的服務(wù)名
以便創(chuàng)建表空間和用戶,表結(jié)構(gòu)等
4 運(yùn)行$SWINGHOME/winbin/swingbench.bat進(jìn)行壓力測(cè)試
選擇配好的jdbc或oci連接
然后輸入用戶數(shù),相關(guān)訂單事物數(shù),就可以進(jìn)行壓力測(cè)試了 本文出自:億恩科技【1tcdy.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|