pub struct JobComparison {
pub job: u64,
pub baseline: Baseline,
pub figures: Vec<FigureDelta>,
pub steps: Vec<StepDelta>,
pub steps_cut: bool,
}Expand description
GET /v1/jobs/{id}/compare: a job beside its baseline.
Fields§
§job: u64The job.
baseline: BaselineWhat it is compared with.
figures: Vec<FigureDelta>Whole-job figures, each given where the job is final; the baseline’s always is.
steps: Vec<StepDelta>This job’s steps in order, then the baseline’s steps it does not have; none without a baseline.
steps_cut: boolWhether a job had more steps, or more of their names, than a comparison reads, so steps leaves its last
ones out (COMPARE_STEPS_MAX, COMPARE_STEP_BYTES).
Implementations§
Source§impl JobComparison
impl JobComparison
Sourcepub fn same_job(job: &JobSummary, other: &JobSummary) -> bool
pub fn same_job(job: &JobSummary, other: &JobSummary) -> bool
Whether other is a run of the same job as job: the same repository, a known and equal workflow, the same
name, and not job itself.
Sourcepub fn is_baseline(job: &JobSummary, other: &JobSummary) -> bool
pub fn is_baseline(job: &JobSummary, other: &JobSummary) -> bool
Whether other may be job’s baseline: a run of the same job on the same known branch, queued before it
(by time, then ID), that completed success with a runner here.
Sourcepub fn baseline_of<'history>(
job: &JobSummary,
history: &'history [JobSummary],
) -> Result<&'history JobSummary, Unavailable>
pub fn baseline_of<'history>( job: &JobSummary, history: &'history [JobSummary], ) -> Result<&'history JobSummary, Unavailable>
job’s baseline among history: the latest that is_baseline; or why there
is none. As the store picks it.
Sourcepub fn in_history(
id: u64,
with: Option<u64>,
history: &[Job],
usage: impl Fn(&Job) -> Vec<StepUsage>,
) -> Option<JobComparison>
pub fn in_history( id: u64, with: Option<u64>, history: &[Job], usage: impl Fn(&Job) -> Vec<StepUsage>, ) -> Option<JobComparison>
Job id beside the job with names, or its baseline, in history held in memory, usage reading a job’s
steps’ samples: as the store answers it, for the demo’s fake daemon and the fixtures. None without either
job. Steps and samples are read only once a baseline is found.
Sourcepub fn of(
job: &JobSummary,
steps: &ComparedSteps,
usage: &[StepUsage],
baseline: BaselineRead,
) -> JobComparison
pub fn of( job: &JobSummary, steps: &ComparedSteps, usage: &[StepUsage], baseline: BaselineRead, ) -> JobComparison
job, whose steps a comparison reads are steps and their samples usage, beside the baseline the store
read. Without a baseline, steps and usage are not looked at, so the store need not read them.
Sourcepub fn steps_cut_words(&self) -> Option<&'static str>
pub fn steps_cut_words(&self) -> Option<&'static str>
What steps leaves out, worded; None when nothing.
Trait Implementations§
Source§impl Clone for JobComparison
impl Clone for JobComparison
Source§impl Debug for JobComparison
impl Debug for JobComparison
Source§impl<'de> Deserialize<'de> for JobComparison
impl<'de> Deserialize<'de> for JobComparison
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 JobComparison
Source§impl PartialEq for JobComparison
impl PartialEq for JobComparison
Source§impl Serialize for JobComparison
impl Serialize for JobComparison
impl StructuralPartialEq for JobComparison
Auto Trait Implementations§
impl Forget for JobComparison
impl Freeze for JobComparison
impl Move for JobComparison
impl RefUnwindSafe for JobComparison
impl Send for JobComparison
impl Sync for JobComparison
impl Unpin for JobComparison
impl UnsafeUnpin for JobComparison
impl UnwindSafe for JobComparison
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.