class Puma::Cluster
def stats
the master process.
Inside of a child process, this will return all zeroes, as @workers is only populated in
def stats old_worker_count = @workers.count { |w| w.phase != @phase } worker_status = @workers.map do |w| { started_at: utc_iso8601(w.started_at), pid: w.pid, index: w.index, phase: w.phase, booted: w.booted?, last_checkin: utc_iso8601(w.last_checkin), last_status: w.last_status, } end { started_at: utc_iso8601(@started_at), workers: @workers.size, phase: @phase, booted_workers: worker_status.count { |w| w[:booted] }, old_workers: old_worker_count, worker_status: worker_status, }.merge(super) end