压力测试 benchmarksql、loadrunner、jmeter

benchmarksql

准备环境
启动达梦数据库;
准备JDK1.8以上环境;
下载解压benchmarksql5.0;
上传达梦数据库jdbc驱动包:
达梦驱动包:DmJdbcDriver18.jar
上传目录:/home/setup/tpcc/benchmarksql-5.0/lib/

编译工具准备
配置apache-ant的环境变量:
[root@dbtest jdbc]# vi ~/.bash_profile
#添加以下内容
export APACH_HOME=/home/setup/tpcc/apache-ant-1.10.3
export PATH= P A T H : PATH: PATH:APACH_HOME/bin:
[root@dbtest jdbc]# source ~/.bash_profile
编译前如果没有安装jdk1.8的话,执行yum install java-1.8.0-openjdk* -y
本步骤是编译benchmarksql-5.0工具,生成jar文件:
/benchmarksql-5.0/dist/BenchmarkSQL-5.0.jar
[root@dbtest benchmarksql-5.0]# yum install java-1.8.0-openjdk* -y
[root@dbtest benchmarksql-5.0]# ant

编辑初始化配置

修改benchmarksql-5.0/src/client下的jTPCC.java,增加dm相关部分

    if (iDB.equals("firebird"))
        dbType = DB_FIREBIRD;
    else if (iDB.equals("oracle"))
        dbType = DB_ORACLE;
    else if (iDB.equals("postgres"))
        dbType = DB_POSTGRES;
    else if (iDB.equals("dm"))
        dbType = DB_UNKNOWN;
    else
    {
        log.error("unknown database type '" + iDB + "'");
        return;
    }

复制一个props.ora 该名为props.dm 并修改内容
#cp props.ora props.dm
#vi props.dm

db=oracle
driver=dm.jdbc.driver.DmDriver
conn=jdbc:dm://192.168.21.201:5236/DAMENG
user=BENCHMARKSQL
password=123456789
warehouses=8
loadWorkers=8
terminals=32
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=5
//Number of total transactions per minute
limitTxnsPerMin=0
//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=true
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
resultDirectory=myresult%tY-%tm-%td_%tH%tM%tS
osCollectorScript=./misc/os_collector_linux.py
osCollectorInterval=
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值