Age | Commit message (Collapse) | Author |
|
If the number of jobs is large enough, using the floor won't guarantee completion
within the desired interval.
Example:
- interval: 3600
- average duration: 5
- number of nodes: 900
This gives 1.25 as the desired number of threads.
Flooring it means that nodes will only be collected once every ~75 minutes.
By using the ceiling and slightly over-estimating the desired interval is achieved
|
|
Still not sure we want this. But previous one might have caused infinite
loop in #work.
Consider we have just 1 node all together, and our rotation interval is
more than our MAX_INTER_JOB_GAP, then we'd add @want to 2, instead of 1.
Now we want more threads than we have nodes, and 'while @jobs.size <
@jobs.want' will never be true
|
|
@duration isn't set before #duration is ran
|
|
Previously view was 2 nodes, so if average was 7s then some node took
1000s your average would be 503.5s.
Now we're looking rolling average of each node, which might not be wise
either, perhaps I should limit it to last 100 or 1000 nodes. Since we
really don't want another place where we have potentially unbounded
amount of state...
|
|
Silly for shit-and-giggles attempt at rancid
|