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

Function BenchmarkAppendJSONStringViaStrconv

jsonstring_timing_test.go:28–35  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

26}
27
28func BenchmarkAppendJSONStringViaStrconv(b *testing.B) {
29 b.Run("no-special-chars", func(b *testing.B) {
30 benchmarkAppendJSONStringViaStrconv(b, "foo bar baz abc defkjlkj lkjdfs klsdjflfdjoqjo lkj ss")
31 })
32 b.Run("with-special-chars", func(b *testing.B) {
33 benchmarkAppendJSONStringViaStrconv(b, `foo bar baz abc defkjlkj lkjdf" klsdjflfdjoqjo\lkj ss`)
34 })
35}
36
37func benchmarkAppendJSONStringViaStrconv(b *testing.B, s string) {
38 b.ReportAllocs()

Callers

nothing calls this directly

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…