class Roqua::Support::Stats

Constants

NullBackend

Attributes

backend[R]

Public Class Methods

new(backend = NullBackend.instance) click to toggle source
# File lib/roqua/support/stats.rb, line 12
def initialize(backend = NullBackend.instance)
  @backend = backend
end

Public Instance Methods

submit(key, value) click to toggle source

Report a value to the stats backend

# File lib/roqua/support/stats.rb, line 17
def submit(key, value)
  backend.submit(prefix(key), value)
end

Private Instance Methods

prefix(key) click to toggle source
# File lib/roqua/support/stats.rb, line 23
def prefix(key)
  "#{Roqua.appname}.#{key}"
end