Skip to main content

ConvexTimingStatistics

Struct ConvexTimingStatistics 

Source
pub struct ConvexTimingStatistics {
    pub overall_alg: TimedTask,
    pub extraction: TimedTask,
    pub presolve: TimedTask,
    pub solve: TimedTask,
    pub solution_recovery: TimedTask,
    pub linear_system_symbolic_factorization: TimedTask,
    pub linear_system_factorization: TimedTask,
    pub linear_system_back_solve: TimedTask,
}
Expand description

Wall-clock phase accumulator for the dedicated convex (LP / QP / conic) path, the counterpart of TimingStatistics for a solve that has no callbacks, no Hessian updates and no filter line search to attribute time to.

gh #767: print_timing_statistics=yes was accepted on the convex path, reported (used) by print_user_options, and emitted nothing — so a tool attributing cost by phase read 0% everywhere on a convex-routed instance, which is indistinguishable from “already fast” rather than “not measured”. A 9.8 s bearing_400 printed no timer at all.

The rows this reports are the phases the convex path actually has. Four of them — OverallAlgorithm and the three LinearSystem* rows — carry the same labels TimingStatistics::report prints, because they are the same quantities; the rest are named for the convex driver’s own stages rather than reusing NLP row names that would always read zero.

Fields§

§overall_alg: TimedTask

The whole convex driver: extraction through solution recovery. Reported regardless of the detailed-timer switch, matching TimingStatistics::overall_alg.

§extraction: TimedTask

Reading the .nl model into the standard-form convex problem.

§presolve: TimedTask

Convex presolve plus the matching postsolve lift.

§solve: TimedTask

The engine call itself (interior-point or active-set iterations).

§solution_recovery: TimedTask

Recovering per-constraint duals and bound multipliers in the original model’s ordering.

§linear_system_symbolic_factorization: TimedTask§linear_system_factorization: TimedTask§linear_system_back_solve: TimedTask

Implementations§

Source§

impl ConvexTimingStatistics

Source

pub fn new() -> Self

Source

pub fn report(&self) -> String

Format the per-phase report, in the row layout TimingStatistics::report uses (label padded to 42 columns, wall seconds right-aligned). Returns a multi-line string ending in a trailing newline so callers can print! it directly.

Source

pub fn set_detailed_enabled(&self, on: bool)

Enable or disable the detailed per-phase timers, mirroring TimingStatistics::set_detailed_enabled and therefore upstream Ipopt’s timing_statistics gating: with the option off, every start() / end() on these tasks is a no-op and the solve pays no clock syscalls for them.

Self::overall_alg is deliberately left enabled, for the same reason it is on the NLP path — upstream’s help text is explicit that the overall algorithm time is unaffected by this option.

Trait Implementations§

Source§

impl Debug for ConvexTimingStatistics

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ConvexTimingStatistics

Source§

fn default() -> ConvexTimingStatistics

Returns the “default value” for a type. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.