https://github.com/akopytov/sysbench
sysbench 资料
sysbench 安装 in mac10.11.1
git clone https://github.com/akopytov/sysbench
cd sysbench
./autogen.sh
./configure --with-mysql-includes='/usr/local/mysql-5.6.24-osx10.8-x86_64/include' --with-mysql-libs="/usr/local/mysql-5.6.24-osx10.8-x86_64/lib"
make && make install
sysbench --version
压测准备数据
sysbench --test=oltp --oltp-table-size=2000000 --oltp-table-name=tt --mysql-db=test --mysql-user=root --mysql-password=password prepare
压测测试(4个线程)
sysbench --num-threads=4 --test=oltp --oltp-table-size=2000000 --oltp-table-name=tt --mysql-db=test --mysql-user=root --mysql-password=password run