性能测试视频教程(性能测试vu)

lxf2023-12-15 05:10:01

官网下载地址:http://imy SQL . com/WP-content/uploads/2014/09/tpcc-MySQL-src . tgz 1 .用bzr客户端下载软件包[root @ tong 1 ~]# Yuminstallbzr-y[root @ tong 1 ~]# BZ branc。

官网下载地址:

1.用bzr客户端下载软件包。

[root @ tong 1 ~]# yum install bzr-y

[root @ tong 1 ~]# bzr branch LP:~ percona-dev/percona tools/tpcc-MySQL

[root @ tong 1 ~]# CD tpcc-MySQL/src/

[root@tong1 src]# make

[root@tong1 src]# cd..
[root @ tong 1 tpcc-MySQL]# ll
合计252
-rw-r - r -。1根root 1621年4月23日11:24 add _ fkey _ idx . SQL
-rw-r-r-。1 root root 317 Apr 23 11:24 count . SQL
-rw-r-r-。1 root root 3105 Apr 23 11:24 create _ table . SQL
-rw-r-r-。1 root root 763 Apr 23 11:24 drop _ cons . SQL
-rw-r-r-。1 root root 477 Apr 23 11:24 load . sh
-rw-r-r-。1根root 851 Apr 23 11:24自述文件
drwxr-xr-x. 2根root 4096 Apr 23 11:24 schema 2
drwxr-xr-x . 5根root 4096 Apr 23 11:24脚本
drwxr-xr-x. 2根root 4096 Apr 23 11:25 src
-rwxr-xr-x。

[root@tong1 tpcc-mysql]#

2.创建数据库导入表结构

[root @ tong 1 tpcc-MySQL]# MySQL admin create tpcc;
[root @ tong 1 tpcc-MySQL]# MySQL tpcc < create _ table . SQL
[root @ tong 1 tpcc-MySQL]#

3.负载测试数据(tpcc_load)

[root@tong1 tpcc-mysql]#。/tpcc _ load-help
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * # # # # easy # # # TPC-C数据加载器* * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
用法:tpcc _ load[服务器][数据库][用户][传递][仓库]

tpcc _ load[服务器][数据库][用户][传递][仓库][部分] [min_wh] [max_wh]
/Tpcc _ load localhost Tpcc root " " 100-机械硬件仓数量不能少于100,ssd硬件不能少于1000。

4.压力测试数据(tpcc_start)

[root@tong1 tpcc-mysql]#。/tpcc _ start-help
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * # # # easy # # # TPC-C负载生成器* * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
。/tpcc_start:无效选项- '-'
用法:tpcc _ start-h server _ host-P port-d database _ name-u MySQL _ user-P MySQL _ password-w warehouses-c connections-r warmup _ time-l running _ time-I report _ interval-f report _ file-t Trx _ file

-h-MySQL主机

-p-服务端口

-d-测试数据库

-u-用户名

-密码

-w-仓库数量

-c-连接数

-r-测试前的预热时间

-l-测试运行时间。

-I-报告生成时间

-f-指定生成报告文件

[root@tong1 tpcc-mysql]#。/tpcc _ start-h localhost-P 3306-d tpcc-u root-P " "-w 100-c 100-r 120-l 360-f 123 . log > > tpcc-MySQL . log 2 > & 1

[root @ tong 1 tpcc-MySQL]# cat tpcc-MySQL . log
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * # # # easy # # # TPC-C负载生成器* * *
* * * * * * * * * * * * * * * * * * * * *
选项h值为' localhost '
选项P值为' 3306 '
选项d值为' tpcc'
选项u值为)
[测量]: 360(秒。)

上升时间。(120秒。)-预热时间120s

测量开始。-每10S收集的信息

10,27 (0): 1.191 | 1.236,27(。2(0):1.567|1.570,0(0):3.804|3.933
20,46(0):1.417|1.501,26(0):0.348|0.357,2(0):0.171|0.175,5(0):1.417|1.477,1(0):0.000|4.351
30 21(0):1.337|1.394,13(0):0.291|0.326,3(0):0.149|0.158,4(0):1.492|1.493,3(0):5.839|6.008
160,47(0):1.419|1.427,39(0):0.355|0.378,1(1 1(0):0.000|1.393,6(0):5.310|5.910
290,69(0):1.511|1.522,30(0):0.369|0.407,0(0):0.000|0.000,2(0):1.313|1.314,5(0):5.994|6.222
....................................................................................................


[0]Sc:993 lt:0 rt:0 fl:0
[1]Sc:946 lt:0 rt:0 fl:0
[2]Sc:97 lt:0 rt:0 fl:0
[3]Sc:96 lt:0 rt:0 fl:0
[4]Sc:86 lt:0 rt:0 fl:0
in 360

[0]sc:993 lt:0 rt:0 fl:0-新订单业务成功笔数(成功的简称),延迟(。

[1]SC:953 lt:0RT:0FL:0-支付业务统计

adminjs.cn是一个以CSS、JavaScript、Vue、HTML为核心的前端开发技术网站。我们致力于为广大前端开发者提供专业、全面、实用的前端开发知识和技术支持。 在本网站中,您可以学习到最新的前端开发技术,了解前端开发的最新趋势和最佳实践。我们提供丰富的教程和案例,让您可以快速掌握前端开发的核心技术和流程。 Adminjs.cn还提供一系列实用的工具和插件,帮助您更加高效地进行前端开发工作。我们提供的工具和插件都经过精心设计和优化,可以帮助您节省时间和精力,提升开发效率。 在Adminjs.cn中,您可以找到您需要的一切前端开发资源,让您成为一名更加优秀的前端开发者。欢迎您加入我们的大家庭,一起探索前端开发的无限可能!