Sha256: 88159f3e2e505414e7078df3a95f9a86b778dd7f9cb6c6252870e7867281b411

Contents?: true

Size: 283 Bytes

Versions: 6

Compression:

Stored size: 283 Bytes

Contents

Lux.app do
  before do
    Thread.current[:db_q] = { time: 0.0, cnt: 0 }
  end

  after do
    next unless Thread.current[:db_q]
    Lux.log " #{Thread.current[:db_q][:cnt]} DB queries, #{(Thread.current[:db_q][:time]*1000).round(1)} ms" if Thread.current[:db_q][:cnt] > 0
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./plugins/db/logger/lux_response_adapter.rb
lux-fw-0.5.36 ./plugins/db/logger/lux_response_adapter.rb
lux-fw-0.5.35 ./plugins/db/logger/lux_response_adapter.rb
lux-fw-0.5.34 ./plugins/db/logger/lux_response_adapter.rb
lux-fw-0.5.33 ./plugins/db/logger/lux_response_adapter.rb
lux-fw-0.5.32 ./plugins/db/logger/lux_response_adapter.rb