Home > database > 测试工具–super-mack

测试工具–super-mack

上一篇介绍了sysbench,接着介绍super-smack:

1.首先下载super-smack源码包,这里下载最新版本的super-smack.
2 解压/安装:
A.解压:—>tar zxvf super-smack-1.3.tar.gz
mkdir /home/mysql/xuancan/super-smack
cd super-smack-1.3
B.安装:—>./configure –prefix=/home/mysql/xuancan/super-smack \
–with-mysql \
–with-mysql-lib=/u01/mysql/lib/mysql \
–with-mysql-include=/u01/mysql/include/mysql
–prefix=/home/mysql/xuancan/super-smack \—–存放super-smack的bin文件的目录
–with-mysql \                                        —-指定super-smack用于mysql
–with-mysql-lib=/u01/mysql/lib/mysql \      —-指定安装mysql的lib目录
–with-mysql-include=/u01/mysql/include/mysql —指定安装mysql的include目录
3.make
4.make install
5.载入数据:
./gen-data  -n 90000 -f %12-12s%n,%25-25s,%n,%d> /home/mysql/xuancan/super-smack/super-data/words.dat
6.开始测试:
innodb:
A.select:
super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/select-key.smack 10 1000
./super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/select-key.smack 10 1000
Query Barrel Report for client smacker1
connect: max=0ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    20000   0       0       55071.84
B.update:
super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/update-select.smack 10 1000
$./super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/update-select.smack 10 1000
Query Barrel Report for client smacker
connect: max=0ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    10000   0       0       10370.89
update_index    10000   0       0       10370.89
myisam:
A.select:
$./super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/update-select.smack 10 1000
Query Barrel Report for client smacker
connect: max=1ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    10000   0       0       8326.15
update_index    10000   0       0       8326.15
B.update:
[MS-Master@my064111.sqa.cm4 ~/xuancan/super-smack/bin]
$./super-smack -d mysql /home/mysql/xuancan/super-smack-1.3/smacks/select-key.smack 10 1000
Query Barrel Report for client smacker1
connect: max=1ms  min=0ms avg= 0ms from 10 clients
Query_type      num_queries     max_time        min_time        q_per_s
select_index    20000   0       0       49288.28
错误解决:
在make的过程中出现:
query.cc:200: error: cast from ‘char*’ to ‘unsigned int’ loses precision
query.cc:200: error: cast from ‘char*’ to ‘unsigned int’ loses precision
query.cc:219: error: cast from ‘char*’ to ‘unsigned int’ loses precision
query.cc:219: error: cast from ‘char*’ to ‘unsigned int’ loses precision
解决办法:
在源文件中找到src文件,打开query.cc,将第200和219的两行四处定义unsigned改为unsigned long:
if((unsigned long)p + str_len + 3 *sizeof(long)  < (unsigned long)p_end );
len = (unsigned long)p – (unsigned long)buf;
测试过程中出现:
error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directo
解决办法:
cp /u01/mysql/lib/mysql/libmysqlclient.so.15 /usr/lib
参考:http://blogold.chinaunix.net/u3/111930/showart_2183752.html
http://blogold.chinaunix.net/u3/111930/showart_2183752.html
Categories: database Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.