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

Function TestCombinerParallel

pkg/model/trace/combine_test.go:109–124  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestCombinerParallel(t *testing.T) {
110 // Ensure that the combiner is safe for parallel use.
111 c := NewCombiner(0, false)
112 var wg sync.WaitGroup
113 for i := 0; i < 10; i++ {
114 wg.Add(1)
115 go func() {
116 defer wg.Done()
117 for j := 0; j < 100; j++ {
118 _, err := c.Consume(test.MakeTraceWithSpanCount(1, 1, []byte{0x01}))
119 require.NoError(t, err)
120 }
121 }()
122 }
123 wg.Wait()
124}
125
126func TestTokenForIDCollision(t *testing.T) {
127 // Estimate the hash collision rate of tokenForID.

Callers

nothing calls this directly

Calls 6

ConsumeMethod · 0.95
MakeTraceWithSpanCountFunction · 0.92
NewCombinerFunction · 0.70
AddMethod · 0.65
DoneMethod · 0.65
WaitMethod · 0.65

Tested by

no test coverage detected