Home

Handler svcrunner/jsonlog

Handlers
Bench Tests
Verify Tests
Summary Links

svcrunner/jsonlog.

svcrunner/jsonlog

Benchmark Data

Score: 98.04
Benchmark Runs Ns/Op Allocs/Op Bytes/Op MB/Sec Score
Attributes 1,000,000 1,091.00 3 280 382.23 98.92
Big Group 12,662 96,323.00 17 139,398 270.70 85.64
Disabled 407,603,260 2.94 0 0 0.00 100.00
Key Values 1,000,000 1,138.00 3 280 366.33 98.94
Logging 57,078 21,071.00 0 0 427.13 99.31
Simple 4,220,899 277.30 0 0 313.68 98.53
Simple Source 4,461,201 276.60 0 0 314.58 99.64
With Attrs Attributes 1,000,000 1,123.00 4 288 693.95 99.10
With Attrs Key Values 1,000,000 1,147.00 4 288 678.07 99.14
With Attrs Simple 3,508,118 356.80 1 8 1,258.31 99.25
With Group Attributes 1,000,000 1,109.00 4 296 387.89 99.12
With Group Key Values 968,470 1,205.00 4 296 357.74 98.92

Benchmark Charts

svcrunner/jsonlog Ns/Op svcrunner/jsonlog Allocs/Op
svcrunner/jsonlog Bytes/Op svcrunner/jsonlog GB/Sec

Warnings

Score: 72.31
Required
LevelVar Unable to change level during execution via LevelVar
Verify: Level Var

level not changed

SlogTest Failure of embedded slog/slogtest
Verify: Slog Test

missing key "msg"
this test expects slog.TimeKey, slog.LevelKey and slog.MessageKey

missing key "msg"
a Handler should handle the WithGroup method

missing key "msg"
a Handler should handle multiple WithGroup and WithAttr calls

missing key "msg"
a Handler should not output groups if there are no attributes

Implied
MessageKey Wrong message key (should be 'msg')
Verify: Canceled Context

`message`

Verify: Canceled Context

`message`

Verify: Canceled Context

`message`

Verify: Keys

`message`

Verify: Source Key

`message`

Verify: Zero PC

`message`

Verify: Zero Time

`message`

NoEmptyName Attributes with empty names are not logged
Verify: Attribute Empty Name

Verify: Attribute With Empty Name

Verify: Attributes Not Empty

Verify: Attributes With Not Empty

NoReplAttr HandlerOptions.ReplaceAttr not available
Verify: Replace Attr

too many attributes: 6, alpha == beta, change still exists, remove still exists

Verify: Replace Attr Basic

time field still exists

message field still exists

source ==

Verify: Replace Attr Fn Change Key

too few attributes: 3

no message key

message not string

Verify: Replace Attr Fn Level Case

level value not null

Verify: Replace Attr Fn Multi

Verify: Replace Attr Fn Remove Empty Key

Verify: Replace Attr Fn Remove Time

time value not empty string

SourceKey Source data not logged when AddSource flag set
Bench: Simple Source

no 'source' key

Verify: Source Key

no 'source' key

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

map[alpha:2 charlie:3]

Verify: Attribute With Duplicate

map[alpha:2 charlie:3]

DurationString slog.Duration() logs a string representation instead of nanoseconds
Verify: Group Duration

8h3m22s

Verify: Log Attributes

1m0s