Skip to content

Commit

Permalink
Debug load.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jun 23, 2024
1 parent f525276 commit cf9e8ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/async/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def initialize(parent = nil, selector: nil)
# @returns [Float] The load of the scheduler. 0.0 means no load, 1.0 means fully loaded or over-loaded.
def load
total_time = @busy_time + @idle_time
$stderr.puts "@busy_time: #{@busy_time} @idle_time: #{@idle_time} total_time: #{total_time}"

# If the total time is zero, then the load is zero:
return 0.0 if total_time.zero?
Expand Down

0 comments on commit cf9e8ea

Please sign in to comment.