MCPcopy
hub / github.com/uber-go/zap / generateStringSlice

Function generateStringSlice

zapcore/json_encoder_bench_test.go:67–73  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

65}
66
67func generateStringSlice(n int) StringSlice {
68 output := make(StringSlice, 0, n)
69 for i := 0; i < n; i++ {
70 output = append(output, fmt.Sprint("00000000-0000-0000-0000-0000000000", i))
71 }
72 return output
73}
74
75func BenchmarkZapJSON(b *testing.B) {
76 additional := generateStringSlice(_sliceSize)

Callers 2

BenchmarkZapJSONFunction · 0.85
BenchmarkStandardJSONFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected