Sha256: 0f52c3904278c794b0cf15dc09c9415aa215bbe134a94ee43573a3433fed6338
Contents?: true
Size: 418 Bytes
Versions: 11
Compression:
Stored size: 418 Bytes
Contents
class Unicorns include Watchman def self.data out = PS.data.inject({:masters => [], :workers => []}) do |acc,line| if line[:command][/^start master/] acc[:masters] << line end if line[:command][/^start worker/] acc[:workers] << line end acc end out.merge({:num_masters => out[:masters].count, :num_workers => out[:workers].count, :summary => [:num_masters, :num_workers]}) end end
Version data entries
11 entries across 11 versions & 1 rubygems