[input] General statistics: total time: 0.3987s total number of events: 10000 total time taken by event execution: 0.3971s response time: min: 0.04ms
[output] total time: 0.3987s
Signed-off-by: Hu XueJiao 1034502035@qq.com --- stats/sysbench-threads-git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 stats/sysbench-threads-git
diff --git a/stats/sysbench-threads-git b/stats/sysbench-threads-git new file mode 100755 index 00000000..a8cf0b53 --- /dev/null +++ b/stats/sysbench-threads-git @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby + +LKP_SRC ||= ENV['LKP_SRC'] + +# General statistics: +# total time: 0.3987s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms + +$results_total = {} + +def add_result(results, key, val) + results[key] ||= [] + results[key] << val +end + +$stdin.each_line do |line| + case line + when /total time:\s+([0-9.]+)/ + add_result($results_total, 'total time', $1.to_f) + end +end + +$results_total.each do |key, vals| + puts "#{key}: #{vals.inject(0.0, :+)s}" +end
On Thu, Nov 12, 2020 at 06:14:04PM +0800, Hu Xuejiao wrote:
[input] General statistics: total time: 0.3987s total number of events: 10000 total time taken by event execution: 0.3971s response time: min: 0.04ms
[output] total time: 0.3987s
Signed-off-by: Hu XueJiao 1034502035@qq.com
stats/sysbench-threads-git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 stats/sysbench-threads-git
diff --git a/stats/sysbench-threads-git b/stats/sysbench-threads-git new file mode 100755 index 00000000..a8cf0b53 --- /dev/null +++ b/stats/sysbench-threads-git @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby
add license
Thanks, Jiaxin
+LKP_SRC ||= ENV['LKP_SRC']
+# General statistics: +# total time: 0.3987s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms
+$results_total = {}
+def add_result(results, key, val)
- results[key] ||= []
- results[key] << val
+end
+$stdin.each_line do |line|
- case line
- when /total time:\s+([0-9.]+)/
- add_result($results_total, 'total time', $1.to_f)
- end
+end
+$results_total.each do |key, vals|
- puts "#{key}: #{vals.inject(0.0, :+)s}"
+end
2.23.0
On Thu, Nov 12, 2020 at 06:18:16PM +0800, Lin Jiaxin wrote:
On Thu, Nov 12, 2020 at 06:14:04PM +0800, Hu Xuejiao wrote:
[input] General statistics: total time: 0.3987s total number of events: 10000 total time taken by event execution: 0.3971s response time: min: 0.04ms
[output] total time: 0.3987s
Signed-off-by: Hu XueJiao 1034502035@qq.com
stats/sysbench-threads-git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 stats/sysbench-threads-git
diff --git a/stats/sysbench-threads-git b/stats/sysbench-threads-git new file mode 100755 index 00000000..a8cf0b53 --- /dev/null +++ b/stats/sysbench-threads-git @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby
add license
please use "license: xxx"
It will deduct point score.
Thanks, Chenglong
Thanks, Jiaxin
+LKP_SRC ||= ENV['LKP_SRC']
+# General statistics: +# total time: 0.3987s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms
+$results_total = {}
+def add_result(results, key, val)
- results[key] ||= []
- results[key] << val
+end
+$stdin.each_line do |line|
- case line
- when /total time:\s+([0-9.]+)/
- add_result($results_total, 'total time', $1.to_f)
- end
+end
+$results_total.each do |key, vals|
- puts "#{key}: #{vals.inject(0.0, :+)s}"
+end
2.23.0
On Thu, Nov 12, 2020 at 06:14:04PM +0800, Hu Xuejiao wrote:
[input] General statistics: total time: 0.3987s total number of events: 10000 total time taken by event execution: 0.3971s response time: min: 0.04ms
[output] total time: 0.3987s
Signed-off-by: Hu XueJiao 1034502035@qq.com
stats/sysbench-threads-git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 stats/sysbench-threads-git
diff --git a/stats/sysbench-threads-git b/stats/sysbench-threads-git new file mode 100755 index 00000000..a8cf0b53 --- /dev/null +++ b/stats/sysbench-threads-git @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby
+LKP_SRC ||= ENV['LKP_SRC']
+# General statistics: +# total time: 0.3987s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms
+$results_total = {}
Why use $? It seems like a shell variable.
Thanks, Jiaxin
+def add_result(results, key, val)
- results[key] ||= []
- results[key] << val
+end
+$stdin.each_line do |line|
- case line
- when /total time:\s+([0-9.]+)/
- add_result($results_total, 'total time', $1.to_f)
- end
+end
+$results_total.each do |key, vals|
- puts "#{key}: #{vals.inject(0.0, :+)s}"
+end
2.23.0
On Thu, Nov 12, 2020 at 06:14:04PM +0800, Hu Xuejiao wrote:
[input] General statistics: total time: 0.3987s total number of events: 10000 total time taken by event execution: 0.3971s response time: min: 0.04ms
[output] total time: 0.3987s
Signed-off-by: Hu XueJiao 1034502035@qq.com
stats/sysbench-threads-git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 stats/sysbench-threads-git
diff --git a/stats/sysbench-threads-git b/stats/sysbench-threads-git new file mode 100755 index 00000000..a8cf0b53 --- /dev/null +++ b/stats/sysbench-threads-git @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby
+LKP_SRC ||= ENV['LKP_SRC']
LKP_SRC is not used in this file, delete it?
Thanks, Yuanchao
+# General statistics: +# total time: 0.3987s +# total number of events: 10000 +# total time taken by event execution: 0.3971s +# response time: +# min: 0.04ms
+$results_total = {}
+def add_result(results, key, val)
- results[key] ||= []
- results[key] << val
+end
+$stdin.each_line do |line|
- case line
- when /total time:\s+([0-9.]+)/
- add_result($results_total, 'total time', $1.to_f)
- end
+end
+$results_total.each do |key, vals|
- puts "#{key}: #{vals.inject(0.0, :+)s}"
+end
2.23.0