MCPcopy
hub / github.com/valyala/quicktemplate / benchmarkQWriterQ

Function benchmarkQWriterQ

writer_timing_test.go:55–68  ·  view source on GitHub ↗
(b *testing.B, size int)

Source from the content-addressed store, hash-verified

53}
54
55func benchmarkQWriterQ(b *testing.B, size int) {
56 s := createTestS(size)
57 b.SetBytes(int64(size))
58 b.RunParallel(func(pb *testing.PB) {
59 var w QWriter
60 bb := AcquireByteBuffer()
61 w.w = bb
62 for pb.Next() {
63 w.Q(s)
64 bb.Reset()
65 }
66 ReleaseByteBuffer(bb)
67 })
68}
69
70func BenchmarkQWriterJ1(b *testing.B) {
71 benchmarkQWriterJ(b, 1)

Callers 5

BenchmarkQWriterQ1Function · 0.85
BenchmarkQWriterQ10Function · 0.85
BenchmarkQWriterQ100Function · 0.85
BenchmarkQWriterQ1KFunction · 0.85
BenchmarkQWriterQ10KFunction · 0.85

Calls 6

QMethod · 0.95
createTestSFunction · 0.85
AcquireByteBufferFunction · 0.85
ReleaseByteBufferFunction · 0.85
NextMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…