Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cortexproject/cortex
/ NewActiveUsers
Function
NewActiveUsers
pkg/util/users/active_user.go:20–24 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
18
}
19
20
func
NewActiveUsers() *ActiveUsers {
21
return
&ActiveUsers{
22
timestamps:
map
[string]*atomic.Int64{},
23
}
24
}
25
26
func
(m *ActiveUsers) UpdateUserTimestamp(userID string, ts int64) {
27
m.mu.RLock()
Callers
6
NewActiveUsersCleanupService
Function · 0.85
TestActiveUser
Function · 0.85
TestActiveUser_ActiveUsers
Function · 0.85
TestActiveUserConcurrentUpdateAndPurge
Function · 0.85
BenchmarkActiveUsers_UpdateUserTimestamp
Function · 0.85
BenchmarkActiveUsers_Purge
Function · 0.85
Calls
no outgoing calls
Tested by
5
TestActiveUser
Function · 0.68
TestActiveUser_ActiveUsers
Function · 0.68
TestActiveUserConcurrentUpdateAndPurge
Function · 0.68
BenchmarkActiveUsers_UpdateUserTimestamp
Function · 0.68
BenchmarkActiveUsers_Purge
Function · 0.68