Make ruby2crystal convert
Signed-off-by: Zhang Yu 2134782174@qq.com --- stats/crystal/sysbench-mysql.cr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stats/crystal/sysbench-mysql.cr
diff --git a/stats/crystal/sysbench-mysql.cr b/stats/crystal/sysbench-mysql.cr new file mode 100644 index 00000000..1f6709c2 --- /dev/null +++ b/stats/crystal/sysbench-mysql.cr @@ -0,0 +1,17 @@ +#!/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.) + +while (line = STDIN.gets) + next unless line =~ /transactions:.*(\s*(\S+)/ + puts "transactions: #{$1}" +end
On Thu, Nov 26, 2020 at 09:13:27AM +0800, Zhang Yu wrote:
Make ruby2crystal convert
Signed-off-by: Zhang Yu 2134782174@qq.com
stats/crystal/sysbench-mysql.cr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stats/crystal/sysbench-mysql.cr
diff --git a/stats/crystal/sysbench-mysql.cr b/stats/crystal/sysbench-mysql.cr new file mode 100644 index 00000000..1f6709c2 --- /dev/null +++ b/stats/crystal/sysbench-mysql.cr @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby
^^^ crystal
Thanks, Baijing
+# 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.)
+while (line = STDIN.gets)
- next unless line =~ /transactions:.*(\s*(\S+)/
- puts "transactions: #{$1}"
+end
2.23.0
+#!/usr/bin/env ruby
^^^ crystal
good
Thanks, Zhangyu
+# 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.)
+while (line = STDIN.gets)
- next unless line =~ /transactions:.*(\s*(\S+)/
- puts "transactions: #{$1}"
+end
2.23.0
On Thu, Nov 26, 2020 at 09:13:27AM +0800, Zhang Yu wrote:
Make ruby2crystal convert
Signed-off-by: Zhang Yu 2134782174@qq.com
stats/crystal/sysbench-mysql.cr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stats/crystal/sysbench-mysql.cr
diff --git a/stats/crystal/sysbench-mysql.cr b/stats/crystal/sysbench-mysql.cr new file mode 100644 index 00000000..1f6709c2 --- /dev/null +++ b/stats/crystal/sysbench-mysql.cr @@ -0,0 +1,17 @@ +#!/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.)
+while (line = STDIN.gets)
- next unless line =~ /transactions:.*(\s*(\S+)/
Add blank line after next cmd.
Thanks, Xijian
- puts "transactions: #{$1}"
+end
2.23.0