MCPcopy
hub / github.com/redis/go-redis / BenchmarkWriteBuffer_Append

Function BenchmarkWriteBuffer_Append

internal/proto/writer_test.go:93–103  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

91}
92
93func BenchmarkWriteBuffer_Append(b *testing.B) {
94 buf := proto.NewWriter(discard{})
95 args := []interface{}{"hello", "world", "foo", "bar"}
96
97 for i := 0; i < b.N; i++ {
98 err := buf.WriteArgs(args)
99 if err != nil {
100 b.Fatal(err)
101 }
102 }
103}
104
105var _ = Describe("WriteArg", func() {
106 var buf *bytes.Buffer

Callers

nothing calls this directly

Calls 2

WriteArgsMethod · 0.95
NewWriterFunction · 0.92

Tested by

no test coverage detected