Last active
August 29, 2015 14:03
-
-
Save tgxworld/05a8c804f8717e8298d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'byebug' | |
integration = [] | |
File.open('/home/guoxiang/app2/itest.txt', 'r').each_line do |line| | |
line.match(/Finished in ([\d.]+)/) | |
integration << $1.to_f if $1 | |
end | |
functional = [] | |
File.open('/home/guoxiang/app2/ftest.txt', 'r').each_line do |line| | |
line.match(/Finished in ([\d.]+)/) | |
functional << $1.to_f if $1 | |
end | |
integration_average = integration.inject(0.0) { |sum, n| sum + n } / integration.size | |
functional_average = functional.inject(0.0) { |sum, n| sum + n } / functional.size | |
puts integration_average | |
puts functional_average |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment