Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
futures_ext: fix yield periodically log timing bugs
Summary: The `YieldPeriodically` adapter's log timing has a couple of bugs: * If the budget is changed (using `with_budget`) we don't update the `log_threshold` value, so we won't change when we log. * When we do exceed the budget, we don't take into account that some of the excess *is* part of the budget, so the log timing is dependent coincindentally on how much budget happens to be left over. Fix both of these bugs and simplify things a little. Just compare the overshoot (`elapsed - remaining budget`) against `BUDGET_OVERSHOOT_MULTIPLIER` times the overall budget. Differential Revision: D68895351 fbshipit-source-id: 189509b8864f48fbe9263b4c1f587493b290299a
- Loading branch information