Documentation ¶
Overview ¶
Package stats is an experimental package for getting statistics on CUE evaluations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counts ¶
type Counts struct { // Unifications counts the number of calls to adt.Unify Unifications int // Disjuncts indicates the number of total disjuncts processed as part // of a Unify operation. A unification with no | operator counts as a // single disjunct, so Disjuncts is always greater than or equal to the // number of Unifications. // // If Disjuncts is much larger than Unification, this may indicate room // for optimization. In particular, most practical uses of disjunctions // should allow for near-linear processing. Disjuncts int // Conjuncts is an estimate of the number of conjunctions processed during // the calls to Unify. This includes the conjuncts added in the compilation // phase as well as the derivative conjuncts inserted from other nodes // after following references. // // A number of Conjuncts much larger than Disjuncts may indicate non-linear // algorithmic behavior. Conjuncts int Freed int // Number of buffers returned to the free pool. Reused int // Number of times a buffer is reused instead of allocated. Allocs int // Total number of allocated buffer objects. Retained int // Number of times a buffer is retained upon finalization. }
Counts holds counters for key events during a CUE evaluation.
This is an experimental type and the contents may change without notice.
func (Counts) Leaks ¶
Leaks reports the number of nodeContext structs leaked. These are typically benign, as they will just be garbage collected, as long as the pointer from the original nodes has been eliminated or the original nodes are also not referred to. But Leaks may have notable impact on performance, and thus should be avoided.
Click to show internal directories.
Click to hide internal directories.