Skip to main content

Analyzer

Struct Analyzer 

Source
pub struct Analyzer {
    pub issues: Vec<Issue>,
    pub graph: IssueGraph,
    pub metrics: GraphMetrics,
}

Fields§

§issues: Vec<Issue>§graph: IssueGraph§metrics: GraphMetrics

Implementations§

Source§

impl Analyzer

Source

pub const DEFAULT_INSIGHT_LIMIT: usize = 20

Default limit for insight result lists (bottlenecks, influencers, etc.).

Source

pub fn new(issues: Vec<Issue>) -> Self

Source

pub fn new_with_config(issues: Vec<Issue>, config: &AnalysisConfig) -> Self

Source

pub fn new_fast(issues: Vec<Issue>) -> Self

Create an analyzer with only fast O(V+E) metrics computed.

Betweenness, eigenvector, and HITS are deferred. Call [spawn_slow_computation] to compute them in a background thread.

Source

pub fn is_large_graph(&self) -> bool

Returns true if this graph exceeds the background computation threshold.

Source

pub fn spawn_slow_computation(&self) -> Receiver<GraphMetrics>

Spawn a background thread to compute expensive metrics.

Returns a receiver that will yield the slow-phase GraphMetrics when done. The caller should poll via try_recv() and call apply_slow_metrics().

Source

pub fn apply_slow_metrics(&mut self, slow: GraphMetrics)

Merge slow-phase metrics into this analyzer’s metrics.

Source

pub fn triage(&self, options: TriageOptions) -> TriageComputation

Source

pub fn plan(&self, score_by_id: &HashMap<String, f64>) -> ExecutionPlan

Source

pub fn what_if(&self, issue_id: &str) -> Option<WhatIfDelta>

Source

pub fn top_what_ifs(&self, top_n: usize) -> Vec<WhatIfDelta>

Source

pub fn insights(&self) -> Insights

Source

pub fn insights_with_limit(&self, max_items: usize) -> Insights

Source

pub fn advanced_insights(&self) -> AdvancedInsights

Source

pub fn top_k_unlock_set(&self, k: usize) -> TopKSetResult

Compute ONLY the top-k submodular unlock-maximizing set.

Prefer this over advanced_insights() when the caller needs just the unlock ranking. advanced_insights() additionally computes coverage, k-paths, cycle-break, parallel-cut, and parallel-gain — each scales with graph size, and on a 5k-issue graph that’s seconds of wasted work when all you want is top_k_set. See issue #4 (--robot-overview) for the motivating use case.

Source

pub fn priority( &self, min_confidence: f64, max_results: usize, by_label: Option<&str>, by_assignee: Option<&str>, ) -> Vec<Recommendation>

Source

pub fn diff(&self, before_issues: &[Issue]) -> SnapshotDiff

Source

pub fn history( &self, only_issue_id: Option<&str>, limit: usize, ) -> Vec<IssueHistory>

Source

pub fn forecast( &self, issue_id_or_all: &str, label_filter: Option<&str>, agents: usize, ) -> ForecastOutput

Source

pub fn suggest(&self, options: &SuggestOptions) -> RobotSuggestOutput

Source

pub fn alerts(&self, options: &AlertOptions) -> RobotAlertsOutput

Trait Implementations§

Source§

impl Clone for Analyzer

Source§

fn clone(&self) -> Analyzer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Analyzer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more