-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix metrics and observations in autopilot runloop #3039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just 2 nits.
// Report orders that were part of a non-winning solution candidate | ||
// but only if they were part of the auction (filter out jit orders) | ||
non_winning_orders.retain(|uid| auction_uids.contains(uid)); | ||
super::Metrics::matched_unsettled(&winner.driver, non_winning_orders); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we prepare for having multiple winners I'm not sure if recording the global winner still makes sense here. Ultimately it's not the global winner's responsibility to settle all possible orders.
I'm even not sure if this information is so helpful in the single winner setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered the same, so ended up leaving it this way as having the list of non-winning orders might still be useful to observe, although the driver itself is not that important anymore I guess. I think we can reevaluate after some time and probably remove it if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR addresses several smaller issues related to metrics in the autopilot run loop and refactors functions in preparation for #2996 (comment).
Changes
Self::is_solution_fair
is now checked for every solution, not just for the global winner (fixing an oversight in PR #2996)Next step: refactor
competition
function from shadow and main runloop to be exactly the same and unify theParticipant
struct (currently both modes have their own version).How to test
Existing e2e tests