pub struct Profile {
pub name: &'static str,
pub warmup: usize,
pub samples: usize,
pub cold_spawns: usize,
pub deferred: bool,
}Expand description
How much to measure.
Fields§
§name: &'static strThe name (quick, full, ci).
warmup: usizeCalls before the samples.
samples: usizeSamples per target and cache mode.
cold_spawns: usizeProcesses spawned for the process-cold target, and samples per cache mode of a deferred panel: the targets whose one sample costs what a whole quick run does.
deferred: boolAre the UI’s deferred panels measured? Their sources (the integration queue, the
delivery report) are the reason the UI defers them, and one sample of one of them
takes longer than every other target together; only full admits them.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn admits(&self, target: &BenchmarkTarget) -> bool
pub fn admits(&self, target: &BenchmarkTarget) -> bool
Does this profile measure the target? Every target but a deferred panel, which only a profile that admits deferred panels does.
use majordomus_cli::bench::{BenchmarkTarget, Profile, TargetKind, View};
let panel = BenchmarkTarget {
key: "system.http.ui.panels.drain".into(),
kind: TargetKind::Page {
route: "/ui/panels/drain".into(),
view: View::Pinned,
deferred: true,
},
};
assert!(!Profile::QUICK.admits(&panel) && !Profile::CI.admits(&panel));
assert!(Profile::FULL.admits(&panel));Trait Implementations§
impl Copy for Profile
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.