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

Function TestRowPoolRelease

tempodb/encoding/vparquet5/block_traceql_pool_test.go:145–161  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

143}
144
145func TestRowPoolRelease(t *testing.T) {
146 pool := newRowPool(5)
147
148 // Get a row from the pool and populate it
149 row1 := pool.Get()
150 row1 = append(row1, parquet.ValueOf("value1"))
151 row1 = append(row1, parquet.ValueOf(42))
152 row1 = append(row1, parquet.ValueOf(true))
153
154 pool.Put(row1)
155
156 row2 := pool.Get()
157
158 // Verify the reused row is properly cleared
159 assert.Len(t, row2, 0, "row should be empty after release")
160 assert.Equal(t, 5, cap(row2), "capacity should be preserved")
161}

Callers

nothing calls this directly

Calls 5

newRowPoolFunction · 0.70
GetMethod · 0.65
LenMethod · 0.65
PutMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected