Calculates the default statistic values for a given attribute, like the duration, requests, etc.
# File lib/bigbench/post_processor/environment.rb, line 244 def initialize x, y, degree @x, @y = x, y end
The maximum of the attribute
# File lib/bigbench/post_processor/environment.rb, line 249 def max @y.max end
The mean or average of the attribute
# File lib/bigbench/post_processor/environment.rb, line 259 def mean @y.average end
The minimum of the attribute
# File lib/bigbench/post_processor/environment.rb, line 254 def min @y.min end
The squared deviation or variance of the attribute
# File lib/bigbench/post_processor/environment.rb, line 272 def squared_deviation u = mean @y.inject(0){ |result, element| result + (element - u) ** 2 }.to_f / @y.size.to_f end
The standard deviation or sd of the attribute
# File lib/bigbench/post_processor/environment.rb, line 265 def standard_deviation u = mean @y.inject(0){ |result, element| result + (element - u).abs }.to_f / @y.size.to_f end