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

Benchmark Runs Ns/Op Allocs/Op Bytes/Op MB/Sec
Attributes 803,263 1,502.00 6 472 277.59
Big Group 51,270 23,819.00 1 48 442.28
Disabled 307,638,812 3.99 0 0 0.00
Key Values 778,650 1,530.00 6 472 272.62
Logging 46,228 27,730.00 0 0 317.28
Simple 3,962,881 302.00 0 0 274.86
Simple Source 1,424,109 865.70 6 568 319.96
With Attrs Attributes 807,038 1,494.00 6 472 523.43
With Attrs Key Values 777,950 1,558.00 6 472 502.55
With Attrs Simple 3,699,673 299.80 0 0 1,497.58
With Group Attributes 773,347 1,537.00 6 472 280.37
With Group Key Values 785,809 1,567.00 6 472 274.97

Check box to see charts

Warnings

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

map[alpha:2 charlie:3]

Verify: Attribute With Duplicate

map[alpha:2 charlie:3]