
On Fri, Nov 13, 2020 at 10:00:47AM +0800, Zhang Yu wrote:
[input] SQL statistics: queries performed: total: 298163456 transactions: 14908172 (25024.26 per sec.) ... [output] transactions: 25024.26
Signed-off-by: Zhang Yu <2134782174@qq.com> --- stats/sysbench-mysql | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 stats/sysbench-mysql
diff --git a/stats/sysbench-mysql b/stats/sysbench-mysql new file mode 100755 index 00000000..5f4e9fd6 --- /dev/null +++ b/stats/sysbench-mysql @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby + +# SQL statistics: +# queries performed: +# read: 210212086 +# write: 60060591 +# other: 30030296 +# total: 300302973 +# transactions: 15015147 (25024.26 per sec.) +# queries: 300302973 (500485.16 per sec.) +# ignored errors: 2 (0.00 per sec.) +# reconnects:0 (0.00 per sec.) +# +# General statistics: +# total time: 600.0222s +# total number of events: 15015147 +# +# Latency (ms): +# min: 2.74 +# avg: 10.23 +# max: 2238.49 +# 95th percentile: 15.55 +# sum: 153573603.78
It is better to display the related data in the comment part, there is too much content. Thanks, Baijing
+# Threads fairness: +# events (avg/stddev): 58652.9180/4292.14 +# execution time (avg/stddev): 599.8969/0.01 + +while (line = STDIN.gets) + case line.chomp! + when /transactions:[^(]*\(([^\s]*)/ + puts "transactions: #{$1}" + end +end -- 2.23.0