GetState extracts the CostTracker from the Activation.
(frame *ExecutionFrame)
| 86 | |
| 87 | // GetState extracts the CostTracker from the Activation. |
| 88 | func (ct *costTrackerFactory) GetState(frame *ExecutionFrame) any { |
| 89 | if frame == nil || frame.ctx == nil { |
| 90 | return nil |
| 91 | } |
| 92 | return frame.ctx.costs |
| 93 | } |
| 94 | |
| 95 | // Observe computes the incremental cost of each step and records it into the CostTracker associated |
| 96 | // with the evaluation. |