pub struct PerformanceScoreWeightedComponent {
pub measurement: String,
pub weight: f64,
pub p10: f64,
pub p50: f64,
pub optional: bool,
}
Expand description
Defines a weighted component for a performance score.
Weight is the % of score it can take up (eg. LCP is a max of 35% weight for desktops) Currently also contains (p10, p50) which are used for log CDF normalization of the weight score
Fields§
§measurement: String
Measurement (eg. measurements.lcp) to be matched against. If this measurement is missing the entire profile will be discarded.
weight: f64
Weight [0,1.0] of this component in the performance score
p10: f64
p10 used to define the log-normal for calculation
p50: f64
Median used to define the log-normal for calculation
optional: bool
Whether the measurement is optional. If the measurement is missing, performance score processing may still continue, and the weight will be 0.
Trait Implementations§
source§impl Clone for PerformanceScoreWeightedComponent
impl Clone for PerformanceScoreWeightedComponent
source§fn clone(&self) -> PerformanceScoreWeightedComponent
fn clone(&self) -> PerformanceScoreWeightedComponent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for PerformanceScoreWeightedComponent
impl Default for PerformanceScoreWeightedComponent
source§fn default() -> PerformanceScoreWeightedComponent
fn default() -> PerformanceScoreWeightedComponent
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PerformanceScoreWeightedComponent
impl<'de> Deserialize<'de> for PerformanceScoreWeightedComponent
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PerformanceScoreWeightedComponent
impl RefUnwindSafe for PerformanceScoreWeightedComponent
impl Send for PerformanceScoreWeightedComponent
impl Sync for PerformanceScoreWeightedComponent
impl Unpin for PerformanceScoreWeightedComponent
impl UnwindSafe for PerformanceScoreWeightedComponent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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