MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / end_step

Method end_step

graphlite/src/plan/trace.rs:87–113  ·  view source on GitHub ↗

End the current step and record it

(
        &mut self,
        phase: PlanningPhase,
        description: String,
        input_plan: Option<PlanSnapshot>,
        output_plan: Option<PlanSnapshot>,
        cost_estimate: Option<CostE

Source from the content-addressed store, hash-verified

85
86 /// End the current step and record it
87 pub fn end_step(
88 &mut self,
89 phase: PlanningPhase,
90 description: String,
91 input_plan: Option<PlanSnapshot>,
92 output_plan: Option<PlanSnapshot>,
93 cost_estimate: Option<CostEstimate>,
94 metadata: TraceMetadata,
95 ) {
96 let duration = self
97 .current_step_start
98 .map(|start| start.elapsed())
99 .unwrap_or_else(|| Duration::from_millis(0));
100
101 let step = TraceStep {
102 phase,
103 description,
104 duration,
105 input_plan,
106 output_plan,
107 cost_estimate,
108 metadata,
109 };
110
111 self.steps.push(step);
112 self.current_step_start = None;
113 }
114
115 /// Finalize the trace with the final plans
116 pub fn finalize(self, logical_plan: LogicalPlan, physical_plan: PhysicalPlan) -> PlanTrace {

Callers 2

trace_stepMethod · 0.80
plan_query_with_traceMethod · 0.80

Calls 1

elapsedMethod · 0.80

Tested by

no test coverage detected