pub struct TimingStatistics {Show 22 fields
pub overall_alg: TimedTask,
pub print_problem_statistics: TimedTask,
pub initialize_iterates: TimedTask,
pub update_hessian: TimedTask,
pub output_iteration: TimedTask,
pub update_barrier_parameter: TimedTask,
pub compute_search_direction: TimedTask,
pub compute_acceptable_trial_point: TimedTask,
pub accept_trial_point: TimedTask,
pub check_convergence: TimedTask,
pub linear_system_factorization: TimedTask,
pub linear_system_back_solve: TimedTask,
pub linear_system_structure_converter: TimedTask,
pub linear_system_structure_converter_init: TimedTask,
pub quality_function_search: TimedTask,
pub total_callback_time: TimedTask,
pub total_function_evaluation_time: TimedTask,
pub eval_obj: TimedTask,
pub eval_grad_obj: TimedTask,
pub eval_constr: TimedTask,
pub eval_constr_jac: TimedTask,
pub eval_lag_hess: TimedTask,
}Expand description
Aggregate of per-subsystem TimedTask counters. Mirrors
Algorithm/IpTimingStatistics.{hpp,cpp}. Owned by IpoptApplication
and shared (via Rc) with the algorithm, NLP, and KKT solver so each
subsystem can bump its own field. Reported at the end of a solve
when print_timing_statistics yes.
Fields§
§overall_alg: TimedTask§print_problem_statistics: TimedTask§initialize_iterates: TimedTask§update_hessian: TimedTask§output_iteration: TimedTask§update_barrier_parameter: TimedTask§compute_search_direction: TimedTask§compute_acceptable_trial_point: TimedTask§accept_trial_point: TimedTask§check_convergence: TimedTask§linear_system_factorization: TimedTask§linear_system_back_solve: TimedTask§linear_system_structure_converter: TimedTask§linear_system_structure_converter_init: TimedTask§quality_function_search: TimedTask§total_callback_time: TimedTask§total_function_evaluation_time: TimedTask§eval_obj: TimedTask§eval_grad_obj: TimedTask§eval_constr: TimedTask§eval_constr_jac: TimedTask§eval_lag_hess: TimedTaskImplementations§
Source§impl TimingStatistics
impl TimingStatistics
pub fn new() -> TimingStatistics
Sourcepub fn report(&self) -> String
pub fn report(&self) -> String
Format a per-subsystem timing report (wall-clock seconds, mirroring
upstream IpoptApplication’s end-of-run “Timing Statistics” block
but with sys/cpu columns omitted — pounce only tracks wall time).
Lines are indented to reflect the upstream visual nesting
(OverallAlgorithm → its phases; TotalFunctionEvaluations → its
per-callback breakdown). Returns a multi-line string ending in a
trailing newline so callers can print! it directly.
Sourcepub fn wall_time_breakdown(&self) -> Vec<(&'static str, f64)>
pub fn wall_time_breakdown(&self) -> Vec<(&'static str, f64)>
Structured wall-clock breakdown (seconds) of the major solve
subsystems, as ordered (label, seconds) pairs. Same numbers
Self::report prints, but as data rather than formatted text,
so a programmatic consumer (e.g. the Python Problem.solve info
dict) can attribute a solve’s runtime without scraping the report
or patching the solver.
Ordered coarse→fine: the overall algorithm total; the
linear-algebra split (linear_system_total = factorization +
back-solve, with factorization broken out); and the per-callback
function-evaluation split (objective / gradient / constraints /
Jacobian / Lagrangian Hessian). This is exactly the func /
Jacobian / Hessian time split issue #180 needs to reproduce a
Table-6-style “where did the time go” analysis for a
reduced-space / variable-aggregation solve.
Sourcepub fn set_detailed_enabled(&self, on: bool)
pub fn set_detailed_enabled(&self, on: bool)
Enable or disable the detailed per-subsystem timers, mirroring
upstream Ipopt’s timing_statistics gating (IpoptApplication
only measures the detailed function/phase timers when
timing_statistics=yes). When on is false every start() /
end() on these tasks becomes a no-op, so a fast-objective solve
stops paying two getrusage syscalls per timed section (issue
#190).
Self::overall_alg is deliberately left untouched: its
live_cpu_time() feeds the max_cpu_time convergence check and
its total is reported regardless of the option — upstream’s help
text is explicit that “the overall algorithm time is unaffected by
this option”. Callers that need the detailed
Self::wall_time_breakdown populated (the Python info["timing"]
dict, the CLI timing.json) must therefore set timing_statistics
(or print_timing_statistics, which implies it) to yes.
Trait Implementations§
Source§impl Debug for TimingStatistics
impl Debug for TimingStatistics
Source§impl Default for TimingStatistics
impl Default for TimingStatistics
Source§fn default() -> TimingStatistics
fn default() -> TimingStatistics
Auto Trait Implementations§
impl !Freeze for TimingStatistics
impl !RefUnwindSafe for TimingStatistics
impl !Sync for TimingStatistics
impl Send for TimingStatistics
impl Unpin for TimingStatistics
impl UnsafeUnpin for TimingStatistics
impl UnwindSafe for TimingStatistics
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
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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