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

Function generateRandomInt

cmd/tempo-vulture/main.go:471–481  ·  view source on GitHub ↗
(minVal, maxVal int64, r *rand.Rand)

Source from the content-addressed store, hash-verified

469}
470
471func generateRandomInt(minVal, maxVal int64, r *rand.Rand) int64 {
472 minVal++
473 var duration int64
474 duration = 1
475 // This is to prevent a panic when min == max since subtracting them will end in a negative number
476 if minVal < maxVal {
477 duration = maxVal - minVal
478 }
479 number := minVal + r.Int63n(duration)
480 return number
481}
482
483func traceInTraces(traceID string, traces []*tempopb.TraceSearchMetadata) bool {
484 for _, t := range traces {

Callers 1

selectPastTimestampFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected