pub enum Advice {
TooFew {
jobs: u64,
},
Keep {
memory: u64,
},
Lower {
memory: u64,
slots: u32,
},
Raise {
memory: u64,
slots: u32,
},
SliceTooSmall {
memory: u64,
},
}Expand description
What to set a profile’s memory and slots to. memory is the largest sampled peak plus the margin, or plus
PAGE_CACHE_ROOM when that is more, rounded up to 256M: the cap kills a job that goes over it, so it is sized for
the heaviest run, not a percentile.
Variants§
TooFew
Fewer than min_jobs jobs: too few to advise on.
Keep
The cap fits, and lowering it would save less than a tenth or a run met its cap.
Lower
The cap is a tenth or more above what the jobs need, and no run met its cap.
Fields
Raise
The jobs need more than the cap.
Fields
SliceTooSmall
The jobs need more than the cap, and the slice’s MemoryMax does not hold one slot of what they need (under
measured admission, one runner beside the mirror): the slice has to grow first. Also when the cap is at
what [host] memory_ceiling or max_memory holds it to (ProfileSizing::held): that has to grow first.
Implementations§
Trait Implementations§
impl Copy for Advice
Source§impl<'de> Deserialize<'de> for Advice
impl<'de> Deserialize<'de> for Advice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Advice
impl StructuralPartialEq for Advice
Auto Trait Implementations§
impl Forget for Advice
impl Freeze for Advice
impl RefUnwindSafe for Advice
impl Send for Advice
impl Sync for Advice
impl Unpin for Advice
impl UnsafeUnpin for Advice
impl UnwindSafe for Advice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.