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

Function benchmarkAppendJSONStringViaStrconv

jsonstring_timing_test.go:37–46  ·  view source on GitHub ↗
(b *testing.B, s string)

Source from the content-addressed store, hash-verified

35}
36
37func benchmarkAppendJSONStringViaStrconv(b *testing.B, s string) {
38 b.ReportAllocs()
39 b.SetBytes(int64(len(s)))
40 b.RunParallel(func(pb *testing.PB) {
41 var buf []byte
42 for pb.Next() {
43 buf = strconv.AppendQuote(buf[:0], s)
44 }
45 })
46}

Callers 1

Calls 1

NextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…