pub struct ConcentrationBucket {
pub request_fraction: f64,
pub requests: u64,
pub token_share: f64,
pub cost_share: Option<f64>,
}Expand description
Cumulative concentration: the top request_fraction of requests (by tokens)
account for token_share of all tokens — the classic “fat tail” statement.
Fields§
§request_fraction: f64Top fraction of requests by count (e.g. 0.05 = the heaviest 5 %).
requests: u64Requests in this top slice: ceil(request_fraction * n), clamped to
1..=n.
Their share of total tokens (0.0..=1.0).
Their share of total priced cost, or None when total cost is zero.
Trait Implementations§
Source§impl Clone for ConcentrationBucket
impl Clone for ConcentrationBucket
Source§fn clone(&self) -> ConcentrationBucket
fn clone(&self) -> ConcentrationBucket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConcentrationBucket
impl Debug for ConcentrationBucket
Auto Trait Implementations§
impl Freeze for ConcentrationBucket
impl RefUnwindSafe for ConcentrationBucket
impl Send for ConcentrationBucket
impl Sync for ConcentrationBucket
impl Unpin for ConcentrationBucket
impl UnsafeUnpin for ConcentrationBucket
impl UnwindSafe for ConcentrationBucket
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