Sha256: 0fd4aad4796a64c33ae0fa00426dbf4a721ea31b2c2291a8d50749eabbb0acb7

Contents?: true

Size: 382 Bytes

Versions: 30

Compression:

Stored size: 382 Bytes

Contents

# frozen_string_literal: true

module Sequel
  class Database
    alias_method :log_duration_original, :log_duration
    def log_duration(duration, message)
      # `duration` will be in seconds, but we need it in milliseconds for internal consistency.
      ::Rack::MiniProfiler.record_sql(message, duration * 1000)
      log_duration_original(duration, message)
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rack-mini-profiler-3.3.1 lib/patches/db/sequel.rb
rack-mini-profiler-3.3.0 lib/patches/db/sequel.rb
rack-mini-profiler-3.2.1 lib/patches/db/sequel.rb
rack-mini-profiler-3.2.0 lib/patches/db/sequel.rb
rack-mini-profiler-3.1.1 lib/patches/db/sequel.rb
rack-mini-profiler-3.1.0 lib/patches/db/sequel.rb
rack-mini-profiler-3.0.0 lib/patches/db/sequel.rb
rack-mini-profiler-2.3.4 lib/patches/db/sequel.rb
rack-mini-profiler-2.3.3 lib/patches/db/sequel.rb
rack-mini-profiler-2.3.2 lib/patches/db/sequel.rb
rack-mini-profiler-2.3.1 lib/patches/db/sequel.rb
rack-mini-profiler-2.3.0 lib/patches/db/sequel.rb
rack-mini-profiler-2.2.1 lib/patches/db/sequel.rb
rack-mini-profiler-2.2.0 lib/patches/db/sequel.rb
rack-mini-profiler-2.1.0 lib/patches/db/sequel.rb
rack-mini-profiler-2.0.4 lib/patches/db/sequel.rb
rack-mini-profiler-2.0.3 lib/patches/db/sequel.rb
rack-mini-profiler-2.0.2 lib/patches/db/sequel.rb
rack-mini-profiler-2.0.1 lib/patches/db/sequel.rb
rack-mini-profiler-2.0.0 lib/patches/db/sequel.rb