MCPcopy
hub / github.com/grafana/tempo / newBranchPredictor

Function newBranchPredictor

pkg/traceql/util.go:166–173  ·  view source on GitHub ↗
(numBranches int, numSamples int)

Source from the content-addressed store, hash-verified

164}
165
166func newBranchPredictor(numBranches int, numSamples int) branchOptimizer {
167 return branchOptimizer{
168 totals: make([]time.Duration, numBranches),
169 last: make([]time.Duration, numBranches),
170 samplesRemaining: numSamples,
171 Recording: true,
172 }
173}
174
175// Start recording. Should be called immediately prior to a branch execution.
176func (b *branchOptimizer) Start() {

Callers 1

newBinaryOperationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected