MCPcopy Create free account
hub / github.com/brimdata/super / newPullerBatch

Function newPullerBatch

sbuf/batch.go:111–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109var pullerBatchPool sync.Pool
110
111func newPullerBatch() *pullerBatch {
112 b, ok := pullerBatchPool.Get().(*pullerBatch)
113 if !ok {
114 b = &pullerBatch{
115 buf: make([]byte, PullerBatchBytes),
116 vals: make([]super.Value, PullerBatchValues),
117 }
118 }
119 b.buf = b.buf[:0]
120 b.refs.Store(1)
121 b.vals = b.vals[:0]
122 return b
123}
124
125// appendVal appends a copy of val to b. appendVal returns true if b is full
126// (i.e., b.buf is full, b.buf had insufficient space for val.Bytes, or b.val is

Callers 1

PullMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected