Sha256: a21276b6a79502bb7b96236db4b530c78b956c6c11f90b4a61cdbd48b162b455

Contents?: true

Size: 1.22 KB

Versions: 14

Compression:

Stored size: 1.22 KB

Contents

# encoding: UTF-8
module RocketJob
  # Heartbeat
  #
  # Information from the worker as at it's last heartbeat
  class Heartbeat
    include MongoMapper::EmbeddedDocument

    embedded_in :worker

    # @formatter:off
    # Time of the last heartbeat received from this worker
    key :updated_at,                 Time

    # Number of threads running as at the last heartbeat interval
    key :active_threads,             Integer
    # Number of threads in the pool
    #   This number should grow and shrink between 1 and :max_threads
    key :current_threads,             Integer

    #
    # Process Information
    #

    # Percentage utilization for the worker process alone
    key :process_cpu,                Integer
    # Kilo Bytes used by the worker process (Virtual & Physical)
    key :process_mem_phys_kb,        Integer
    key :process_mem_virt_kb,        Integer

    #
    # System Information
    #

    # Percentage utilization for the host machine
    key :host_cpu,                   Integer
    # Kilo Bytes Available on the host machine (Physical)
    key :host_mem_avail_phys_kbytes, Float
    key :host_mem_avail_virt_kbytes, Float

    # If available
    key :load_average,               Float
    # @formatter:on

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rocketjob-2.1.3 lib/rocket_job/heartbeat.rb
rocketjob-2.1.2 lib/rocket_job/heartbeat.rb
rocketjob-2.1.1 lib/rocket_job/heartbeat.rb
rocketjob-2.0.0 lib/rocket_job/heartbeat.rb
rocketjob-2.0.0.rc3 lib/rocket_job/heartbeat.rb
rocketjob-2.0.0.rc2 lib/rocket_job/heartbeat.rb
rocketjob-2.0.0.rc1 lib/rocket_job/heartbeat.rb
rocketjob-1.3.0 lib/rocket_job/heartbeat.rb
rocketjob-1.2.1 lib/rocket_job/heartbeat.rb
rocketjob-1.2.0 lib/rocket_job/heartbeat.rb
rocketjob-1.1.3 lib/rocket_job/heartbeat.rb
rocketjob-1.1.2 lib/rocket_job/heartbeat.rb
rocketjob-1.1.1 lib/rocket_job/heartbeat.rb
rocketjob-1.1.0 lib/rocket_job/heartbeat.rb