Mysql性能测试工具tpcc使用
来源:互联网 发布:政府网站改版优化文案 编辑:程序博客网 时间:2024/05/21 04:20
1、下载tpcc-mysql-src.tgz源码包到/opt下
先执行 gunzip 解压缩文件比如gunzip 然后解包
进入/opt/tpcc-mysql/src 执行 make 进行安装 然后执行./tpcc_load localhost tpcc100 root 'root' 1这时就不会报错了
2、root@itcast01:/tmp/tpcc-mysql # ls
add_fkey_idx.sql create_table.sql load.sh schema2 src tpcc_start
count.sql drop_cons.sql README scripts tpcc_load
可以看出编译之后出现了tpcc_start,tpcc_load两个脚本;
3、 #创建库
mysql> create database tpcc;
Query OK, 1 row affected (0.00 sec)
#创建表结构
mysql> source /tmp/tpcc-mysql/create_table.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected, 1 warning (0.00 sec)
#创建索引
mysql> source /tmp/tpcc-mysql/add_fkey_idx.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
+--------------+
| Tables_in_t1 |
+--------------+
| customer | #用户表
| district | #分布表
| history | #历史记录表
| item | #订单详情表
| new_orders | #新订单表
| order_line |
| orders | #商品表
| stock |
| warehouse | #仓库相关表
+--------------+
9 rows in set (0.00 sec)
6、开始测试
./tpcc_start-h server_host-P port-d database_name-u mysql_user-p mysql_password-w warehouse -c connections-r warmup_time -I running_time-i ~/tpcc-mysql# ./tpcc_start-h127.0.0.1-P3306-d tpcc-u root-p 000000-w 1-c 5-r 1-l 10-i 1-f test.t -t t_file> tt.t
各个参数的用法:
-h server_host: 服务器名
-P port : 端口号,默认为3306
-d database_name: 数据库名
-u mysql_user : 用户名
-p mysql_password : 密码
-w warehouses: 仓库的数量
-c connections : 指定并发连接数,默认为1
-r warmup_time : 热身时间,单位:s,默认为10s ,热身是为了将数据加载到内存。
-l running_time: 测试时间,单位:s,默认为20s
-i report_interval: 指定生成报告间隔时长
-f report_file: 测试结果输出文件
7、输出解读
[0] sc:378 lt:0 rt:0 fl:0
[1] sc:374 lt:0 rt:0 fl:0
[2] sc:37 lt:0 rt:0 fl:0
[3] sc:36 lt:0 rt:0 fl:0
[4] sc:38 lt:0 rt:0 fl:0
in 10 sec.[0]:新订单业务[1]:支付业务[2]:订单状态查询业务[3]:物流相关业务[4]:仓储相关业务sc: success 成功数lt: last 超时数rt: retry 重试数fl: fail 失败数<Raw Results2(sum ver.)>
[0] sc:378 lt:0 rt:0 fl:0
[1] sc:374 lt:0 rt:0 fl:0
[2] sc:37 lt:0 rt:0 fl:0
[3] sc:36 lt:0 rt:0 fl:0
[4] sc:38 lt:0 rt:0 fl:0
Order-Status:100.00% [OK] Delivery:100.00% [OK] Stock-Level:100.00% [OK]
<TpmC>
- Mysql性能测试工具tpcc使用
- tpcc-mysql 性能测试
- mysql压力测试工具tpcc-mysql安装测试使用
- MySQL基准测试工具TPCC-MySQL使用笔记
- MySQL/Mariadb基准测试工具-tpcc-mysql使用1
- MySQL/Mariadb基准测试工具-tpcc-mysql使用2
- MySQL/Mariadb基准测试工具-tpcc-mysql使用3
- 基准测试工具之tpcc-mysql
- MySQL/Mariadb基准测试工具-TPC,TPCC,TPMC(计算机性能衡量指标)
- Tpcc-Mysql 压测工具使用
- MySQL/Mariadb基准测试工具-tpcc-mysql和sysbench区别
- tpcc mysql 基准测试
- TPCC-MySQL基准测试
- TPCC-MySQL基准测试
- TPCC-MySQL基准测试
- Tpcc-MySQL测试
- Tpcc-MySQL测试详解
- 如何用tpcc-mysql工具进行oltp压力测试
- Windows远程桌面实现之四(在现代浏览器中通过普通页面访问远程桌面)
- jms测试程序_发送和接收
- 百帮忙隐私政策
- jquery easyui tree
- idea快捷键
- Mysql性能测试工具tpcc使用
- python导入第三方模块
- mybatis 3.4.5 缓存 05
- LintCode 744. Sum of first K even-length Palindrome numbers
- linux下安装numpy,pandas、matplotlib
- HDU-1166-敌兵布阵
- 网关和默认路由0.0.0.0
- 进程调度API之task_cpu
- redis window x64 集群环境搭建