pub struct MemoryCurve { /* private fields */ }Expand description
Memory throughput measured across a range of working sets.
Built by sweeping one probe over working_set_sweep; ask it for the
ceiling of a given working set with ceiling_at.
Implementations§
Source§impl MemoryCurve
impl MemoryCurve
Sourcepub fn new(
access: MemoryAccess,
points: impl IntoIterator<Item = MemoryPoint>,
) -> Self
pub fn new( access: MemoryAccess, points: impl IntoIterator<Item = MemoryPoint>, ) -> Self
Assembles a curve from points measured with access.
A point with an empty working set, or a rate that isn’t finite and positive (an unsupported or failed probe), describes nothing and is dropped; duplicated working sets keep the first point.
Sourcepub fn points(&self) -> &[MemoryPoint]
pub fn points(&self) -> &[MemoryPoint]
The measured points, ascending by working set.
Sourcepub fn ceiling_at(&self, bytes: u64) -> Option<f64>
pub fn ceiling_at(&self, bytes: u64) -> Option<f64>
The ceiling for a kernel moving bytes, in bytes moved per second,
interpolated between the two measured points that bracket it and clamped
to the ends of the sweep. None if nothing was measured.
Interpolation is linear in log2(bytes), matching the geometric spacing
the curve is sampled at; it is exact at the measured points.
Below the smallest measured working set the answer is that point’s rate, the least the sweep saw. Above the largest it is the bus figure — that part of the curve is flat, which is why the sweep stops there.
Trait Implementations§
Source§impl Clone for MemoryCurve
impl Clone for MemoryCurve
Source§fn clone(&self) -> MemoryCurve
fn clone(&self) -> MemoryCurve
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryCurve
impl Debug for MemoryCurve
Source§impl PartialEq for MemoryCurve
impl PartialEq for MemoryCurve
impl StructuralPartialEq for MemoryCurve
Auto Trait Implementations§
impl Freeze for MemoryCurve
impl RefUnwindSafe for MemoryCurve
impl Send for MemoryCurve
impl Sync for MemoryCurve
impl Unpin for MemoryCurve
impl UnsafeUnpin for MemoryCurve
impl UnwindSafe for MemoryCurve
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more