MCPcopy Index your code
hub / github.com/valyala/quicktemplate / BenchmarkAppendJSONString

Function BenchmarkAppendJSONString

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

Source from the content-addressed store, hash-verified

6)
7
8func BenchmarkAppendJSONString(b *testing.B) {
9 b.Run("no-special-chars", func(b *testing.B) {
10 benchmarkAppendJSONString(b, "foo bar baz abc defkjlkj lkjdfs klsdjflfdjoqjo lkj ss")
11 })
12 b.Run("with-special-chars", func(b *testing.B) {
13 benchmarkAppendJSONString(b, `foo bar baz abc defkjlkj lkjdf" klsdjflfdjoqjo\lkj ss`)
14 })
15}
16
17func benchmarkAppendJSONString(b *testing.B, s string) {
18 b.ReportAllocs()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…