Class: ActiveRecord::ConnectionAdapters::AbstractAdapter
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::AbstractAdapter
- Defined in:
- lib/custom_benchmarks.rb
Instance Method Summary collapse
-
#initialize(connection, logger = nil) ⇒ AbstractAdapter
constructor
:nodoc:.
-
#reset_runtime(reset = false) ⇒ Object
:nodoc:.
Constructor Details
#initialize(connection, logger = nil) ⇒ AbstractAdapter
:nodoc:
118 119 120 121 122 123 |
# File 'lib/custom_benchmarks.rb', line 118 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:
125 126 127 128 129 130 131 132 133 |
# File 'lib/custom_benchmarks.rb', line 125 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 |