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

Function makeTestSpans

tempodb/encoding/vparquet4/rebatch_trace_test.go:193–208  ·  view source on GitHub ↗
(t testing.TB, n int)

Source from the content-addressed store, hash-verified

191var testSpanCount = 0
192
193func makeTestSpans(t testing.TB, n int) []Span {
194 spans := make([]Span, 0, n)
195 for i := 0; i < n; i++ {
196 testSpanCount++
197
198 spanID := make([]byte, 8)
199 _, err := rand.Read(spanID)
200 require.NoError(t, err)
201
202 spans = append(spans, Span{
203 SpanID: spanID,
204 Name: fmt.Sprintf("span-%d", testSpanCount),
205 })
206 }
207 return spans
208}

Callers 1

TestRebatchTraceFunction · 0.70

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected