Class: Evilution::Parallel::WorkQueue::WorkerStat
- Inherits:
-
Struct
- Object
- Struct
- Evilution::Parallel::WorkQueue::WorkerStat
- Defined in:
- lib/evilution/parallel/work_queue.rb
Instance Attribute Summary collapse
-
#busy_time ⇒ Object
Returns the value of attribute busy_time.
-
#items_completed ⇒ Object
Returns the value of attribute items_completed.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#wall_time ⇒ Object
Returns the value of attribute wall_time.
Instance Method Summary collapse
Instance Attribute Details
#busy_time ⇒ Object
Returns the value of attribute busy_time
12 13 14 |
# File 'lib/evilution/parallel/work_queue.rb', line 12 def busy_time @busy_time end |
#items_completed ⇒ Object
Returns the value of attribute items_completed
12 13 14 |
# File 'lib/evilution/parallel/work_queue.rb', line 12 def items_completed @items_completed end |
#pid ⇒ Object
Returns the value of attribute pid
12 13 14 |
# File 'lib/evilution/parallel/work_queue.rb', line 12 def pid @pid end |
#wall_time ⇒ Object
Returns the value of attribute wall_time
12 13 14 |
# File 'lib/evilution/parallel/work_queue.rb', line 12 def wall_time @wall_time end |
Instance Method Details
#idle_time ⇒ Object
13 14 15 |
# File 'lib/evilution/parallel/work_queue.rb', line 13 def idle_time wall_time - busy_time end |
#utilization ⇒ Object
17 18 19 20 21 |
# File 'lib/evilution/parallel/work_queue.rb', line 17 def utilization return 0.0 if wall_time.nil? || wall_time.zero? busy_time / wall_time end |