CostTracker
CostTracker represents the information needed for tracking runtime cost.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CostTracker(
options?):CostTracker
constructor initializes a runtime cost tracker.
Parameters
Section titled “Parameters”options?
Section titled “options?”CostTrackerOptions = {}
Returns
Section titled “Returns”CostTracker
Methods
Section titled “Methods”actualCost()
Section titled “actualCost()”actualCost():
number
actualCost returns the runtime cost.
Returns
Section titled “Returns”number
clone()
Section titled “clone()”clone():
CostTracker
clone makes a shallow copy of the tracker.
Different clones can be used independently from each other. Accumulated cost and stack state are intentionally reset.
Returns
Section titled “Returns”CostTracker
observe()
Section titled “observe()”observe(
options):void
observe computes the incremental cost of a step and records it in this tracker.
Parameters
Section titled “Parameters”options
Section titled “options”number
programStep
Section titled “programStep”unknown
Val
Returns
Section titled “Returns”void