20.6. mysqlslap - load emulation client

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:
–auto-generate-sql, -a
自动生成测试表和数据

–auto-generate-sql-load-type=type
测试语句的类型。取值包括:read,key,write,update和mixed(默认)。

–number-char-cols=N, -x N
自动生成的测试表中包含多少个字符类型的列,默认1

–number-int-cols=N, -y N
自动生成的测试表中包含多少个数字类型的列,默认1

–number-of-queries=N
总的测试查询次数(并发客户数×每客户查询次数)

–query=name,-q
使用自定义脚本执行测试,例如可以调用自定义的一个存储过程或者sql语句来执行测试。

–create-schema
测试的schema,MySQL中schema也就是database

–commint=N
多少条DML后提交一次

–compress, -C
如果服务器和客户端支持都压缩,则压缩信息传递

–concurrency=N, -c N
并发量,也就是模拟多少个客户端同时执行select。可指定多个值,以逗号或者–delimiter参数指定的值做为分隔符

–engine=engine_name, -e engine_name
创建测试表所使用的存储引擎,可指定多个

–iterations=N, -i N
测试执行的迭代次数

–detach=N
执行N条语句后断开重连

–debug-info, -T
打印内存和CPU的信息

–only-print
只打印测试语句而不实际执行
		
mysqlslap -u root -p -h localhost -c 10,50,100,200 -i 1 \
--engine=myisam --auto-generate-sql-load-type=mixed --number-of-queries=50000 \
--number-char-cols=5 --number-int-cols=5 --auto-generate-sql
		
mysqlslap --defaults-file=/etc/my.cnf --concurrency=50,100,200 --iterations=1 \
--number-int-cols=4 --number-char-cols=4 --auto-generate-sql --auto-generate-sql-add-autoincrement \
--auto-generate-sql-load-type=mixed --engine=myisam,innodb --number-of-queries=200 --debug-info \
-uroot -p -S/tmp/mysql.sock
		





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
Java 关系型数据库 MySQL
问题记录:The last packet sent successfully to the server was ****
集成Mybatis的项目中出现了这个问题,初看很蒙比,最近一次成功发送请求到达服务器,你报错干什么?首先必须说的是这个一个关于Mybatis的报错,那什么原因导致了这个问题呢?
413 0
|
Android开发
storage/emulated/0路径下的File.listFiles返回值为null
storage/emulated/0路径下的File.listFiles返回值为null
480 0
storage/emulated/0路径下的File.listFiles返回值为null
simulation pipeline after change not refresh issue
simulation pipeline after change not refresh issue
81 0
simulation pipeline after change not refresh issue
jMeter CSV Data set config 的 sharing mode 和 Thread group loop 配合使用
jMeter CSV Data set config 的 sharing mode 和 Thread group loop 配合使用
133 0
jMeter CSV Data set config 的 sharing mode 和 Thread group loop 配合使用
A simple tool to calculate the total size of a BSP application
Today Ben asks me whether there is some tool which can allow us to get a draft estimation on the size of a BSP application. As far as I know there is no such tool, so I write one by myself:
99 0
A simple tool to calculate the total size of a BSP application
metadata request forward to GM6 - X-DevTools-Emulate-Network-Conditions-Cli
metadata request forward to GM6 - X-DevTools-Emulate-Network-Conditions-Cli
metadata request forward to GM6 - X-DevTools-Emulate-Network-Conditions-Cli
|
数据库
Multiple Server Query Execution报The result set could not be merged..
在SQL Server中使用Multiple Server Query Execution这个功能做数据库维护或脚本发布时非常方便,昨天由于磁盘空间原因,删除清理了大量的软件和组件,结果导致SSMS客户端出了问题,重装过后,使用Multiple Server Query Execution时,出现了...
956 0
|
关系型数据库 存储 SQL

热门文章

最新文章