pub struct EloTable { /* private fields */ }Expand description
In-process Elo ratings (default 1000). Shared across requests in one serve.
Implementations§
Source§impl EloTable
impl EloTable
pub fn rating(&self, model: &str) -> f32
pub fn set(&self, model: &str, rating: f32)
Sourcepub fn update_pair(&self, winner: &str, loser: &str)
pub fn update_pair(&self, winner: &str, loser: &str)
Update ratings after an outcome: winner gains, loser loses (K=24).
Sourcepub fn observe_latency(&self, model: &str, latency_ms: f32, peers: &[String])
pub fn observe_latency(&self, model: &str, latency_ms: f32, peers: &[String])
Prefer lower latency as a soft win signal for model.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EloTable
impl RefUnwindSafe for EloTable
impl Send for EloTable
impl Sync for EloTable
impl Unpin for EloTable
impl UnsafeUnpin for EloTable
impl UnwindSafe for EloTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more