MCPcopy Create free account
hub / github.com/docker/cli / BenchmarkCode

Function BenchmarkCode

cli/command/formatter/tabwriter/tabwriter_test.go:749–758  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

747`
748
749func BenchmarkCode(b *testing.B) {
750 b.ReportAllocs()
751 for i := 0; i < b.N; i++ {
752 w := NewWriter(io.Discard, 4, 4, 1, ' ', 0) // no particular reason for these settings
753 // The code is small, so it's reasonable for the tabwriter user
754 // to write it all at once, or buffer the writes.
755 w.Write([]byte(codeSnippet))
756 w.Flush()
757 }
758}

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.95
FlushMethod · 0.95
NewWriterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…