(b *testing.B)
| 26 | } |
| 27 | |
| 28 | func 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 | |
| 37 | func benchmarkAppendJSONStringViaStrconv(b *testing.B, s string) { |
| 38 | b.ReportAllocs() |
nothing calls this directly
no test coverage detected
searching dependent graphs…