mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump codeberg.org/gruf/go-structr from 0.7.0 to 0.8.0 (#2902)
Bumps codeberg.org/gruf/go-structr from 0.7.0 to 0.8.0. --- updated-dependencies: - dependency-name: codeberg.org/gruf/go-structr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
18
vendor/codeberg.org/gruf/go-structr/cache.go
generated
vendored
18
vendor/codeberg.org/gruf/go-structr/cache.go
generated
vendored
@ -527,6 +527,24 @@ func (c *Cache[T]) Len() int {
|
||||
return l
|
||||
}
|
||||
|
||||
// Debug returns debug stats about cache.
|
||||
func (c *Cache[T]) Debug() map[string]any {
|
||||
m := make(map[string]any)
|
||||
c.mutex.Lock()
|
||||
m["lru"] = c.lru.len
|
||||
indices := make(map[string]any)
|
||||
m["indices"] = indices
|
||||
for i := range c.indices {
|
||||
var n uint64
|
||||
for _, list := range c.indices[i].data {
|
||||
n += uint64(list.len)
|
||||
}
|
||||
indices[c.indices[i].name] = n
|
||||
}
|
||||
c.mutex.Unlock()
|
||||
return m
|
||||
}
|
||||
|
||||
// Cap returns the maximum capacity (size) of cache.
|
||||
func (c *Cache[T]) Cap() int {
|
||||
c.mutex.Lock()
|
||||
|
Reference in New Issue
Block a user