HammerDB是一个开源的数据库基准测试工具, HammerDB模拟了标准的TPC-C和TPC-H两种测试模型, 目前支持的数据库包括Oracle,SQLServer,DB2,MySQL,MariaDB,PostgreSQL,Redis。 [root@wallet01~]#exportDISPLAY=192.168.1.200:0 [root@wallet01~]#chmoda+xHammerDB-2.23-Linux-x86-64-Install [root@wallet01~]#./HammerDB-2.23-Linux-x86-64-Install
[root@wallet01~]#mysql-uroot-pabcd.1234 mysql>createdatabasetpcc10; QueryOK,1rowaffected(0.02sec) mysql>grantallontpcc10.*to'tpcc'@'%'identifiedby'tpcc'; QueryOK,0rowsaffected(0.06sec) mysql>flushprivileges; QueryOK,0rowsaffected(0.02sec) [root@wallet01~]#yuminstalllibXScrnSaver [root@wallet01~]#cd/usr/local/HammerDB-2.23 [root@wallet01HammerDB-2.23]#./hammerdb.tcl
[root@wallet01~]#mysql-uroot-pabcd.1234 mysql>usetpcc10 Databasechanged mysql>showtables; +------------------+ |Tables_in_tpcc10| +------------------+ |customer| |district| |history| |item| |new_order| |order_line| |orders| |stock| |warehouse| +------------------+ 9rowsinset(0.03sec) mysql>selectnamefrommysql.procwheredb='tpcc10'andtype='PROCEDURE'; +----------+ |name| +----------+ |DELIVERY| |NEWORD| |OSTAT| |PAYMENT| |SLEV| +----------+ 5rowsinset(0.00sec) mysql>showprocedurestatuslike'payment'\G; ***************************1.row*************************** Db:tpcc10 Name:PAYMENT Type:PROCEDURE Definer:tpcc@% Modified:2019-01-1011:32:58 Created:2019-01-1011:32:58 Security_type:DEFINER Comment: character_set_client:utf8 collation_connection:utf8_general_ci DatabaseCollation:utf8_general_ci 1rowinset(0.00sec)