Sha256: 3954ba629235d3bae61f2f8d540f2485316eaec86146af014c9eb0ff1a1e1bd9
Contents?: true
Size: 502 Bytes
Versions: 8
Compression:
Stored size: 502 Bytes
Contents
# frozen_string_literal: true module Sapience module Extensions module Sinatra module Timings extend self def db_runtime=(value) Thread.current[:grape_db_runtime] = value end def db_runtime Thread.current[:grape_db_runtime] ||= 0 end def reset_db_runtime self.db_runtime = 0 end def append_db_runtime(event) self.db_runtime += event.duration end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems