module PassengerInfo

Constants

VERSION

Public Class Methods

from_server_data(hsh) click to toggle source
# File lib/passenger_info.rb, line 27
def self.from_server_data hsh
  hsh["active_clients"].values.map { |c| PassengerInfo::RequestInfo.from_client_data c }
end
from_server_status(txt) click to toggle source
# File lib/passenger_info.rb, line 31
def self.from_server_status txt
  hsh          = JSON.load txt
  (1..hsh["threads"]).map { |n| hsh["thread#{n}"] }.map { |i| from_server_data i }.flatten.sort_by &:number
end