sysbench测试MySQL筛选tps
log=$1
tps_array=`awk -F '[,:]' '{print $4}' ${log}`
zero=0
for tps in ${tps_array}
do
tps=`echo ${tps} |tr -d "."`
if [ ${tps} -eq 0 ]
then
zero=`expr ${zero} + 1`
fi
done
echo "tps 0 num: ${zero}"
文件内容:
[99080s] threads: 128, tps: 7565.93, reads: 105918.67, writes: 30243.15, response time: 41.23ms (95%), errors: 0.40, reconnects: 0.00
[99085s] threads: 128, tps: 7376.95, reads: 103291.67, writes: 29528.20, response time: 42.85ms (95%), errors: 0.40, reconnects: 0.00
[99090s] threads: 128, tps: 7816.97, reads: 109409.52, writes: 31259.06, response time: 41.00ms (95%), errors: 0.20, reconnects: 0.00
[99095s] threads: 128, tps: 6850.42, reads: 95919.01, writes: 27381.86, response time: 45.20ms (95%), errors: 0.80, reconnects: 0.00
[99100s] threads: 128, tps: 7360.14, reads: 103057.95, writes: 29448.55, response time: 43.25ms (95%), errors: 0.20, reconnects: 0.00
[99105s] threads: 128, tps: 7158.81, reads: 100239.21, writes: 28658.47, response time: 44.37ms (95%), errors: 0.20, reconnects: 0.00
[99110s] threads: 128, tps: 7284.31, reads: 101984.49, writes: 29135.42, response time: 43.92ms (95%), errors: 0.20, reconnects: 0.00
[99115s] threads: 128, tps: 7268.57, reads: 101723.54, writes: 29040.05, response time: 43.01ms (95%), errors: 0.80, reconnects: 0.00
[99120s] threads: 128, tps: 7079.80, reads: 99116.06, writes: 28319.02, response time: 44.86ms (95%), errors: 0.20, reconnects: 0.00
[99125s] threads: 128, tps: 7551.02, reads: 105736.69, writes: 30216.08, response time: 41.34ms (95%), errors: 0.60, reconnects: 0.00
执行结果:
shell.sh file
tps 0 num: 4
sysbench测试MySQL筛选tps的更多相关文章
- 使用sysbench测试mysql及postgresql(完整版)
使用sysbench测试mysql及postgresql(完整版) 转载请注明出处https://www.cnblogs.com/funnyzpc/p/14592166.html 前言 使用sysbe ...
- ubuntu 18.04使用sysbench测试MySQL性能
首先下载安装sysbench: sudo apt-get install sysbench -y 查看一下sysbench版本是多少: zifeiy@zifeiy-S1-Series:~$ sysbe ...
- sysbench 测试mysql性能
===== #1sysbench --test=oltp --oltp-table-size=10000 --mysql-db=test --mysql-user=root --mysql-passw ...
- sysbench 测试MYSQL
http://imysql.cn/tag/%E5%8E%8B%E6%B5%8B http://imysql.cn/node/312 https://www.percona.com/blog/2013/ ...
- 测试mysql
sysbench 测试mysql TODO emacs
- 使用sysbench对mysql压力测试
sysbench是一个模块化的.跨平台.多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况.关于这个项目的详细介绍请看:https://github.com/akopytov/sy ...
- 使用 sysbench对mysql进行压力测试介绍之一
sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试.数据库目前支持MySQL/Oracle/PostgreSQL.本文只是简单演示一下几种测试的用 ...
- 使用sysbench对MySQL进行压力测试
1.背景 出自percona公司,是一款多线程系统压测工具,可以根据影响数据库服务器性能的各种因素来评估系统的性能.例如,可以用来测试文件IO,操作系统调度器,内存分配和传输速度,POSIX线程以及 ...
- sysbench测试工具
sysbench简介 Sysbench是一个模块化的.跨平台.多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况.它主要包括以下几种方式的测试:cpu性能,磁盘io性能,线程调度性 ...
随机推荐
- 把Spark SQL的metadata存储到mysql
1:安装配置mysql yum install mysql mysql-server service mysqld start mysqladmin -u root password newpass ...
- 数据结构_coprime_sequence(互质序列)
coprime_sequence(互质序列) 问题描述 顾名思义,互质序列是满足序列元素的 gcd 为 1 的序列.比如[1,2,3],[4,7,8],都是互质序列. [3,6,9]不是互质序列.现在 ...
- deb包制作(转)
deb 包已被广泛应用但是也在不断的更新,这里介绍Ubuntu deb包安装设置使用,帮助大家安装更新Ubuntu deb包系统.制作Ubuntu deb包的三种方法 | Sean's Blog [转 ...
- C#读取文本文件某一行
某一时候,我们只会读取文本文件内某一行.怎样读?还是用for或foreach循环?其实操作起来,很简单,先看看文本文件,如果你也想用下面的文档来做测试,你可以在这个链接进行拷贝:<VB.NET提 ...
- GPU,CUDA,cuDNN的理解
最近用到这方面的知识,感觉这篇文章写的很好,为了方便自己查阅,就搬运了过来,如果牵涉到侵权,请联系我,我会删除该博文!!! 我们知道做深度学习离不开GPU,不过一直以来对GPU和CPU的差别,CUDA ...
- 基于注解的AOP配置
配置文件 spring配置文件中的约束 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...
- css实现点点点效果
@keyframes dotDotDoting{ 0% { width 0px margin-right 15px } 25% { width 0px margin-right 15px } 50% ...
- 【Python OpenGL】【2】第一个三角形(Pyopengl)
根据顶点缓存来生成图元(Python OpenGL) 原文(英文链接)http://ogldev.atspace.co.uk/www/tutorial03/tutorial03.html __auth ...
- AtCoder - 2581 树状数组
You are given an integer sequence of length N, a= {a1,a2,…,aN}, and an integer K. a has N(N+1)⁄2 non ...
- [转载]sscanf函数
来源:http://c.biancheng.net/cpp/html/296.html 头文件:#include <stdio.h> sscanf()函数用于从字符串中读取指定格式的数据, ...