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

Function makeTestSpans

tempodb/encoding/vparquet5/rebatch_trace_test.go:189–204  ·  view source on GitHub ↗
(t testing.TB, n int)

Source from the content-addressed store, hash-verified

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

Callers 1

TestRebatchTraceFunction · 0.70

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected