(b *testing.B)
| 6 | ) |
| 7 | |
| 8 | func 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 | |
| 17 | func benchmarkAppendJSONString(b *testing.B, s string) { |
| 18 | b.ReportAllocs() |
nothing calls this directly
no test coverage detected
searching dependent graphs…