MCPcopy Index your code
hub / github.com/docker/docker-agent / Len

Method Len

pkg/concurrent/buffer.go:40–44  ·  view source on GitHub ↗

Len returns the number of bytes currently buffered.

()

Source from the content-addressed store, hash-verified

38
39// Len returns the number of bytes currently buffered.
40func (b *Buffer) Len() int {
41 b.mu.Lock()
42 defer b.mu.Unlock()
43 return b.buf.Len()
44}
45
46// Reset clears the buffer.
47func (b *Buffer) Reset() {

Callers 8

TestBuffer_LenFunction · 0.95
TestBuffer_ResetFunction · 0.95
TestBuffer_DrainFunction · 0.95
TestBuffer_ConcurrentFunction · 0.95
TestExtractZipFunction · 0.95
TestExtractZip_TooLargeFunction · 0.95

Calls 3

LenMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 8

TestBuffer_LenFunction · 0.76
TestBuffer_ResetFunction · 0.76
TestBuffer_DrainFunction · 0.76
TestBuffer_ConcurrentFunction · 0.76
TestExtractZipFunction · 0.76
TestExtractZip_TooLargeFunction · 0.76