vendor/bundle/ruby/2.3.0/gems/sqreen-1.10.5/lib/sqreen/metrics_store.rb
# Drains every metrics and returns the store content
# @params at [Time] when is the store emptied
Drains every metrics and returns the store content
Drains every metrics and returns the store content
def publish(flush = true, at = Time.now.utc)
      @metrics.each do |name, (_, period, start)|
        next_sample(name, at) if flush || !start.nil? && (start + period) < at
      end
      out = @store
      @store = []
      out
    end
def publish ( flush = true , at = Time . now . utc ) @metrics . each do | name , ( _ , period , start ) | next_sample ( name , at ) if flush || ! start . nil? && ( start + period ) < at end out = @store @store = [ ] out end
Drains every metrics and returns the store content
Drains every metrics and returns the store content
flush
<not_specific>
at
<not_specific>
now
<not_specific>
utc
<not_specific>
params
at [Time] when is the store emptied
at [ Time ] when is the store emptied