Created
September 26, 2020 04:22
-
-
Save shibafu528/462a297f1d78ec8f39069a83fc9f8d50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plugin.create :delayer_high_water_marker | |
Delayer.default.instance_eval do | |
alias run_once_dhwm run_once | |
def run_once(...) | |
s1 = size_norec | |
res = run_once_dhwm(...) | |
s2 = size_norec | |
warn "delayer tasks #{s1} -> #{s2}" | |
res | |
end | |
def size_norec | |
size = 0 | |
node = @bucket.first | |
while node | |
size += 1 | |
node = node.next | |
end | |
size | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment