Home

Handler slog/JSONHandler

Handlers
Bench Tests
Verify Tests
Summary Links

slog/JSONHandler is the JSON handler provided with the slog library. It is fast and as a part of the Go distribution it is used along with published documentation as a model for slog.Handler behavior.

slog/JSONHandler

Benchmark Data

Score: 96.09
Benchmark Runs Ns/Op Allocs/Op Bytes/Op MB/Sec Score
Attributes 728,613 1,460.00 6 472 286.38 96.46
Big Group 13,237 91,607.00 14 112,993 284.60 87.81
Disabled 309,729,339 3.95 0 0 0.00 95.95
Key Values 762,825 1,492.00 6 472 279.40 96.53
Logging 44,634 25,601.00 0 0 343.66 98.72
Simple 3,925,278 288.90 0 0 287.26 98.34
Simple Source 1,426,246 833.00 6 568 332.51 89.29
With Attrs Attributes 833,956 1,475.00 6 472 532.31 97.70
With Attrs Key Values 823,609 1,535.00 6 472 511.42 97.67
With Attrs Simple 3,696,938 314.00 0 0 1,432.95 99.61
With Group Attributes 843,816 1,509.00 6 472 286.21 97.43
With Group Key Values 785,883 1,500.00 6 472 288.07 97.51

Benchmark Charts

slog/JSONHandler Ns/Op slog/JSONHandler Allocs/Op
slog/JSONHandler Bytes/Op slog/JSONHandler GB/Sec

Warnings

Score: 98.46
Suggested
Duplicates Duplicate field(s) found
Verify: Attribute Duplicate

map[alpha:2 charlie:3]

Verify: Attribute With Duplicate

map[alpha:2 charlie:3]