feat: introduce theme management and performance improvements (#7)
This commit is contained in:
18
internal/collector/collector_test_helpers_linux.go
Normal file
18
internal/collector/collector_test_helpers_linux.go
Normal file
@@ -0,0 +1,18 @@
|
||||
//go:build linux
|
||||
|
||||
package collector
|
||||
|
||||
// clearUserCache clears the user lookup cache for testing
|
||||
func clearUserCache() {
|
||||
userCache.Lock()
|
||||
userCache.m = make(map[int]string)
|
||||
userCache.Unlock()
|
||||
}
|
||||
|
||||
// userCacheSize returns the number of cached user entries
|
||||
func userCacheSize() int {
|
||||
userCache.RLock()
|
||||
defer userCache.RUnlock()
|
||||
return len(userCache.m)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user