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

Function BenchmarkZapJSONFloat32AndComplex64

zapcore/json_encoder_bench_test.go:46–54  ·  zapcore/json_encoder_bench_test.go::BenchmarkZapJSONFloat32AndComplex64
(b *testing.B)

Source from the content-addressed store, hash-verified

44}
45
46func BenchmarkZapJSONFloat32AndComplex64(b *testing.B) {
47 b.RunParallel(func(pb *testing.PB) {
48 for pb.Next() {
49 enc := NewJSONEncoder(testEncoderConfig())
50 enc.AddFloat32("float32", 3.14)
51 enc.AddComplex64("complex64", 2.71+3.14i)
52 }
53 })
54}
55
56const _sliceSize = 5000
57

Callers

nothing calls this directly

Calls 5

NewJSONEncoderFunction · 0.85
testEncoderConfigFunction · 0.85
NextMethod · 0.80
AddFloat32Method · 0.65
AddComplex64Method · 0.65

Tested by

no test coverage detected