Skip to content

use utiltimer in memberlist client#7285

Merged
SungJin1212 merged 1 commit intocortexproject:masterfrom
SungJin1212:use-utiltimer-in-memberlist
Feb 24, 2026
Merged

use utiltimer in memberlist client#7285
SungJin1212 merged 1 commit intocortexproject:masterfrom
SungJin1212:use-utiltimer-in-memberlist

Conversation

@SungJin1212
Copy link
Member

Similar to #7270, this PR utilizes a utiltimer in the memberlist client to reuse the timer.

Benchmark results

goos: darwin
goarch: arm64
pkg: github.com/cortexproject/cortex/pkg/ring/kv/memberlist
cpu: Apple M4 Max
                      │   old.txt   │            new.txt             │
                      │   sec/op    │   sec/op     vs base           │
CASTimerAllocation-14   2.001 ± ∞ ¹   2.001 ± ∞ ¹  ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                      │    old.txt    │             new.txt              │
                      │     B/op      │     B/op       vs base           │
CASTimerAllocation-14   402.0Ki ± ∞ ¹   355.5Ki ± ∞ ¹  ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                      │   old.txt   │            new.txt             │
                      │  allocs/op  │  allocs/op   vs base           │
CASTimerAllocation-14   789.0 ± ∞ ¹   752.0 ± ∞ ¹  ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@SungJin1212 SungJin1212 changed the title use utiltimer in memberlist clinet use utiltimer in memberlist client Feb 20, 2026
@SungJin1212 SungJin1212 merged commit 8db5d54 into cortexproject:master Feb 24, 2026
151 of 157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants