vendor/bundle/ruby/2.3.0/gems/sqreen-1.10.5/lib/sqreen/metrics_store.rb
# When a metric is not yet created
When a metric is not yet created
When a metric is not yet created
def next_sample(name, at)
      metric = @metrics[name][0]
      r = metric.next_sample(at)
      @metrics[name][2] = at
      if r
        r[NAME_KEY] = name
        obs = r[Metric::OBSERVATION_KEY]
        @store << r if obs && (!obs.respond_to?(:empty?) || !obs.empty?)
      end
      r
    end
def next_sample ( name , at ) metric = @metrics [ name ] [ 0 ] r = metric . next_sample ( at ) @metrics [ name ] [ 2 ] = at if r r [ NAME_KEY ] = name obs = r [ Metric :: OBSERVATION_KEY ] @store << r if obs && ( ! obs . respond_to? ( :empty? ) || ! obs . empty? ) end r end
When a metric is not yet created
When a metric is not yet created
name
<not_specific>
at
<not_specific>