class LitmusPaper::Metric::BigBrotherService

Public Class Methods

new(service) click to toggle source
# File lib/litmus_paper/metric/big_brother_service.rb, line 4
def initialize(service)
  @service = service
end

Public Instance Methods

current_health() click to toggle source
# File lib/litmus_paper/metric/big_brother_service.rb, line 8
def current_health
  status = Net::HTTP.get('127.0.0.1', "/cluster/#{@service}", 9292)
  if status =~ /CombinedWeight: (\d+)/m
    $1.to_i
  else
    0
  end
end
stats() click to toggle source
# File lib/litmus_paper/metric/big_brother_service.rb, line 17
def stats
  {}
end
to_s() click to toggle source
# File lib/litmus_paper/metric/big_brother_service.rb, line 21
def to_s
  "Metric::BigBrotherService(#{@service})"
end