最近做linux下mysql5.0的性能测试,用了一下super-smack工具
网上的资料很多,关于select-sky.smack文件的正确修改方案也有很多,但就是没找到关于update-select.smack文件的,而只是有提到用命令
super-smack -d mysql update-select.smack 10 1000
update-select.smack文件跟select-sky.smack很相似,只是多了
query "update_by_username"
{ }
在这里我把正确的select-sky.smack文件附上
引用
// this is will be used in the table section
client "admin"
{
user "root";//mysql 用户名
host "localhost";
db "test";//database name
pass "";//password
socket "/var/lib/mysql/mysql.sock"; // this only applies to MySQL and is
// ignored for PostgreSQL
}
// ensure the table exists and meets the conditions
table "http_auth"
{
client "admin"; // connect with this client
// if the table is not found or does not pass the checks, create it
// with the following, dropping the old one if needed
create "create table http_auth
(username char(25) not null primary key,
pass char(25),
uid integer not null,
gid integer not null
)";
min_rows "90000"; // the table must have at least that many rows
data_file "http_auth.dat"; // if the table is empty, load the data from
//this file
gen_data_file "gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d";
// if the file above does not exist, generate it with the above command
}
//define a dictionary
dictionary "word"
{
type "rand";
source_type "file";
source "words.dat";
delim " "; // 将","号改为"tab"
file_size_equiv "45000"; }
//define a query
query "select_by_username"
{
query "select * from http_auth where username = '$word'";
type "select_index";
has_result_set "y";
parsed "y";
}
query "update_by_username"
{
query "update http_auth set pass='$word' where username = '$word'";
type "update_index";
has_result_set "y";
parsed "y";
}
// define database client type
client "smacker2"
{
user "root"; //这里的设置同上
pass "";
host "localhost";
db "test";
socket "/var/lib/mysql/mysql.sock";
query_barrel "1 select_by_username 1 update_by_username";
// 运行一次select_by_username 和 query update_by_username
//运行次数可根据需要修改
}
main
{
smacker2.init(); //smacker2必须和你上面定义的client type用户名相同
//smacker2.set_num_rounds($2); //原文件多了一行,可能会使你的脚本无法运行,在这里删掉
smacker2.set_num_rounds($2);
smacker2.create_threads($1);
smacker2.connect();
smacker2.unload_query_barrel();
smacker2.disconnect();
}
分享到:
相关推荐
Android-Openfire-Smack4.1.2 使用入门
Android-Smack.zip,一种Java和Java(SE)VMS的模块化便携开源XMPP客户端库,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。
Smack About Smack is an open source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android. A pure Java library, it can be embedded into your ...
利用mysqlslap 、sysbench 、supersmack等工具来测试MYSQL集群性能,包含并发读写能力,大数据量下的读写能力,并发事务处理能力,稳定性,单线程性能等给出了测试用例。
mysql测试工具super_smack及mysqlslap的安装介绍、配置文档介绍,相关测试
jxmpp-core-0.5.0-alpha7 jxmpp-util-cache-0.5.0-alpha7 smack-android-4.1.6 smack-core-4.1.6 smack-extensions-4.1.6 smack-im-4.1.6 smack-sasl-provided-4.1.6 smack-tcp-4.1.6
timplus-smack-tcp-netty 使用Netty网络框架的TCP smack连接的实现。 该库的目的是用于在现有实现与TIM +服务提供者之间建立桥接服务的系统。 在许多情况下,网桥服务可能需要与TIM +服务建立数百个(如果不是数千...
XMPP+Openfire4.5.1+Smack4.3.4+MySql,支持手机对手机,手机对PC(Spark)的消息收发
各种测试工具总结 Webbench、Siege、ab、http_load、JMeter mysqlslap、MySQL Benchmark Suite(sql-bench)、super-smack、Database test suite、Percona·s tpcc-mysql tool、Sysbench
重点来说MySQL的基准测试如何进行,也有很多种工具来供我们选择,比如mysqlslap、sysbench、Super Smack等,其中mysqlslap的使用MySQL官网给出了介绍,Super Smack是服务器压力测试强有力的工具,那么sysbench便是...
smack4.1.0的依赖包minidns.jar。可用于smack4.1.3,亲测可用!
common-jetty-testrunner.zip,此包提供两个测试运行程序-一个用于集成测试(初始化
Smack-3.4.1.tar.gz
smack-im-4.2.2.jar smack-tcp-4.2.2.jar smack-extensions-4.2.2.jar smack-core-4.2.2.jar smack-android-extensions-4.2.2.jar jxmpp-jid-0.6.0.jar jxmpp-core-0.6.0.jar jxmpp-util-cache-0.6.0.jar等jar包
sqlbuilder.zip,一个用于构建和执行SQL Stasks.SQL Builder库的轻量级库
最新的 smack4.1.4 android开发demo 可以登录 已验证
smack-jar smack_4_0_0all.zip
欢迎使用OSCON SMACK堆栈教程此回购包含本教程的实验工作。 要浏览此仓库,请从实验室1开始按升序选择实验室。在讲课部分,您将被指导何时开始每个实验室。 以下是每个实验室的简要概述。实验1:构建DC / OS集群预计...
peon.zip,一种牡丹,它在后台执行你想扔给它的任何体力劳动任务;一种爪哇牡丹,它在后台执行你想扔给它的任何体力劳动任务。