Signed-off-by: Lu Kaiyi 2392863668@qq.com --- stats/crystal/sysbench-threads-git.cr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 stats/crystal/sysbench-threads-git.cr
diff --git a/stats/crystal/sysbench-threads-git.cr b/stats/crystal/sysbench-threads-git.cr new file mode 100644 index 00000000..5d9dcc10 --- /dev/null +++ b/stats/crystal/sysbench-threads-git.cr @@ -0,0 +1,14 @@ +#!/usr/bin/env crystal + +# General statistics: +# total time: 0.2671s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms + +while (line = STDIN.gets) + next unless line =~ /^\s+total time:\s+([0-9.]+)/ + + puts "total time: #{$1.to_f}s" +end
On Fri, Dec 04, 2020 at 09:35:01AM +0800, Lu Kaiyi wrote:
Signed-off-by: Lu Kaiyi 2392863668@qq.com
stats/crystal/sysbench-threads-git.cr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 stats/crystal/sysbench-threads-git.cr
diff --git a/stats/crystal/sysbench-threads-git.cr b/stats/crystal/sysbench-threads-git.cr new file mode 100644 index 00000000..5d9dcc10 --- /dev/null +++ b/stats/crystal/sysbench-threads-git.cr @@ -0,0 +1,14 @@ +#!/usr/bin/env crystal
+# General statistics: +# total time: 0.2671s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms
+while (line = STDIN.gets)
- next unless line =~ /^\s+total time:\s+([0-9.]+)/
^ use \s+ ^ (\S+) ?
Thanks, Xueliang
- puts "total time: #{$1.to_f}s"
+end
2.23.0