Class: ActiveRecord::ConnectionAdapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/custom_benchmarks.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection, logger = nil) ⇒ AbstractAdapter

:nodoc:



132
133
134
135
136
137
# File 'lib/custom_benchmarks.rb', line 132

def initialize(connection, logger = nil) #:nodoc:
  @connection, @logger = connection, logger
  @runtime = 0
  @total_runtime = 0
  @last_verification = 0
end

Instance Method Details

#reset_runtime(reset = false) ⇒ Object

:nodoc:



139
140
141
142
143
144
145
146
147
# File 'lib/custom_benchmarks.rb', line 139

def reset_runtime(reset=false) #:nodoc:
  if reset
    rt, @runtime, @total_runtime = @total_runtime, 0, 0
  else
    rt, @runtime = @runtime, 0, 0
  end

  rt
end