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

Method jobSize

modules/frontend/metrics_query_range_sharder.go:377–387  ·  view source on GitHub ↗
(expr *traceql.RootExpr, allowUnsafe bool)

Source from the content-addressed store, hash-verified

375}
376
377func (s *queryRangeSharder) jobSize(expr *traceql.RootExpr, allowUnsafe bool) int {
378 // If we have a query hint then use it
379 if v, ok := expr.Hints.GetInt(traceql.HintJobSize, allowUnsafe); ok && v > 0 {
380 return v
381 }
382
383 // Else use configured value.
384 size := s.cfg.TargetBytesPerRequest
385
386 return size
387}
388
389// exemplarsForBlock calculates exemplars for a single block based on its proportional duration.
390// Example: if a block is 90s out of 100s total, with limit=100, it gets 90*1.2=108 exemplars.

Callers 1

RoundTripMethod · 0.95

Calls 1

GetIntMethod · 0.80

Tested by

no test coverage detected