Class: GroongaQueryLog::Command::CheckPerformanceRegression::Statistic

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/command/check-performance-regression.rb

Direct Known Subclasses

OperationStatistic, QueryStatistic

Instance Method Summary collapse

Constructor Details

#initialize(old, new, threshold) ⇒ Statistic

Returns a new instance of Statistic.



214
215
216
217
218
# File 'lib/groonga-query-log/command/check-performance-regression.rb', line 214

def initialize(old, new, threshold)
  @old = old
  @new = new
  @threshold = threshold
end

Instance Method Details

#diff_elapsed_timeObject



228
229
230
# File 'lib/groonga-query-log/command/check-performance-regression.rb', line 228

def diff_elapsed_time
  new_elapsed_time - old_elapsed_time
end

#new_elapsed_timeObject



224
225
226
# File 'lib/groonga-query-log/command/check-performance-regression.rb', line 224

def new_elapsed_time
  @new_elapsed_time ||= compute_mean(@new)
end

#old_elapsed_timeObject



220
221
222
# File 'lib/groonga-query-log/command/check-performance-regression.rb', line 220

def old_elapsed_time
  @old_elapsed_time ||= compute_mean(@old)
end

#ratioObject



232
233
234
# File 'lib/groonga-query-log/command/check-performance-regression.rb', line 232

def ratio
  @ratio ||= compute_ratio
end