千家信息网

mysql中自带压力测试工具mysqlslap介绍

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,下面一起来了解下mysql中自带压力测试工具mysqlslap介绍,相信大家看完肯定会受益匪浅,文字在精不在多,希望mysql中自带压力测试工具mysqlslap这篇短内容是你想要的。测试示例1查询3
千家信息网最后更新 2025年02月01日mysql中自带压力测试工具mysqlslap介绍

下面一起来了解下mysql中自带压力测试工具mysqlslap介绍,相信大家看完肯定会受益匪浅,文字在精不在多,希望mysql中自带压力测试工具mysqlslap这篇短内容是你想要的。


测试

示例1

查询300次,并发数50
mysqlslap -a -concurrency=50 --number-of-queries 300 -hlocalhost -uroot -proot

Benchmark    Average number of seconds to run all queries: 19.286 seconds    Minimum number of seconds to run all queries: 19.286 seconds    Maximum number of seconds to run all queries: 19.286 seconds    Number of clients running queries: 1    Average number of queries per client: 300Benchmark    Average number of seconds to run all queries: 16.868 seconds    Minimum number of seconds to run all queries: 16.868 seconds    Maximum number of seconds to run all queries: 16.868 seconds    Number of clients running queries: 2    Average number of queries per client: 150Benchmark    Average number of seconds to run all queries: 13.614 seconds    Minimum number of seconds to run all queries: 13.614 seconds    Maximum number of seconds to run all queries: 13.614 seconds    Number of clients running queries: 3
Average number of queries per client: 100

看完mysql中自带压力测试工具mysqlslap这篇文章后,很多读者朋友肯定会想要了解更多的相关内容,如需获取更多的行业信息,可以关注我们的行业资讯栏目。
0