class Blobsterix::StatusApi

Public Instance Methods

cache_accesses() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 54
def cache_accesses
  @cache_accesses||=StatusInfo.cache_access
end
cache_errors() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 50
def cache_errors
  @cache_errors||=StatusInfo.cache_error
end
cache_hit_rate() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 38
def cache_hit_rate
  if cache_hits > 0 && cache_accesses > 0
    cache_hits.to_f/cache_accesses.to_f
  else
    1.to_f
  end
end
cache_hits() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 34
def cache_hits
  @cache_hits||=StatusInfo.cache_hit
end
cache_misses() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 46
def cache_misses
  @cache_misses||=StatusInfo.cache_miss
end
connections() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 58
def connections
  @connections||=StatusInfo.connections
end
ram_usage() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 26
def ram_usage
  `pmap #{Process.pid} | tail -1`[10,40].strip
end
status() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 15
def status
  case format
  when :json
    render_json
  when :xml
    render_xml
  else
    render "status_page"
  end
end
uptime() click to toggle source
# File lib/blobsterix/status/status_api.rb, line 30
def uptime
  @uptime||=StatusInfo.uptime
end