class Mysql2::Result
The best kind of instrumentation is in the actual db provider, however we don't want to double instrument
Public Instance Methods
each(*args, &blk)
click to toggle source
# File lib/patches/db/mysql2.rb, line 5 def each(*args, &blk) return each_without_profiling(*args, &blk) unless defined?(@miniprofiler_sql_id) start = Time.now result = each_without_profiling(*args,&blk) elapsed_time = SqlPatches.elapsed_time(start) @miniprofiler_sql_id.report_reader_duration(elapsed_time) result end
Also aliased as: each_without_profiling