Skip to content

feat: support groups#122

Merged
nrwiersma merged 1 commit intovnextfrom
groups
Apr 8, 2026
Merged

feat: support groups#122
nrwiersma merged 1 commit intovnextfrom
groups

Conversation

@nrwiersma
Copy link
Copy Markdown
Member

Goal of this PR

This adds support for groups, allows group prefixing to be simpler.

The performance change is as follows, and acceptable:

name                   old time/op    new time/op    delta
Logger_Logfmt-8          9.38ns ±35%   10.74ns ±10%     ~     (p=0.133 n=10+9)
Logger_Json-8            11.3ns ±39%    11.5ns ±40%     ~     (p=0.896 n=10+10)
Logger_LogfmtWriter-8    28.8ns ±20%    36.0ns ±14%  +25.14%  (p=0.000 n=10+10)
Logger_LogfmtWithTS-8    14.0ns ±19%    13.3ns ±14%     ~     (p=0.412 n=10+9)
Logger_JsonWithTS-8      14.2ns ±27%    14.5ns ±20%     ~     (p=0.796 n=10+10)
Logger_LogfmtCtx-8       23.4ns ± 8%    23.1ns ±18%     ~     (p=0.549 n=9+10)
Logger_JsonCtx-8         26.3ns ±25%    27.1ns ±14%     ~     (p=0.356 n=10+9)
LevelLogger_Logfmt-8     91.0ns ±14%    89.7ns ±25%     ~     (p=0.781 n=10+10)
LevelLogger_Json-8       94.7ns ±14%    93.5ns ±25%     ~     (p=0.704 n=9+10)

name                   old alloc/op   new alloc/op   delta
Logger_Logfmt-8           0.00B          0.00B          ~     (all equal)
Logger_Json-8             0.00B          0.00B          ~     (all equal)
Logger_LogfmtWriter-8     16.0B ± 0%     16.0B ± 0%     ~     (all equal)
Logger_LogfmtWithTS-8     0.00B          0.00B          ~     (all equal)
Logger_JsonWithTS-8       0.00B          0.00B          ~     (all equal)
Logger_LogfmtCtx-8        0.00B          0.00B          ~     (all equal)
Logger_JsonCtx-8          0.00B          0.00B          ~     (all equal)

name                   old allocs/op  new allocs/op  delta
Logger_Logfmt-8            0.00           0.00          ~     (all equal)
Logger_Json-8              0.00           0.00          ~     (all equal)
Logger_LogfmtWriter-8      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Logger_LogfmtWithTS-8      0.00           0.00          ~     (all equal)
Logger_JsonWithTS-8        0.00           0.00          ~     (all equal)
Logger_LogfmtCtx-8         0.00           0.00          ~     (all equal)
Logger_JsonCtx-8           0.00           0.00          ~     (all equal)

How did I test it?

Unit tests.

@nrwiersma nrwiersma self-assigned this Apr 8, 2026
@nrwiersma nrwiersma merged commit 1678bf2 into vnext Apr 8, 2026
7 checks passed
@nrwiersma nrwiersma deleted the groups branch April 8, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants