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