From 8237e8d09e9561858c87e135df415b920b5d866d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 08:51:06 +0000 Subject: [PATCH] [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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- vendor/codeberg.org/gruf/go-structr/cache.go | 18 ++++++++++++++++++ vendor/codeberg.org/gruf/go-structr/queue.go | 18 ++++++++++++++++++ .../codeberg.org/gruf/go-structr/queue_ctx.go | 18 ++++++++++++++++++ vendor/modules.txt | 2 +- 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 64ff422ca..50fbd4c59 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( codeberg.org/gruf/go-runners v1.6.2 codeberg.org/gruf/go-sched v1.2.3 codeberg.org/gruf/go-store/v2 v2.2.4 - codeberg.org/gruf/go-structr v0.7.0 + codeberg.org/gruf/go-structr v0.8.0 codeberg.org/superseriousbusiness/exif-terminator v0.7.0 github.com/DmitriyVTitov/size v1.5.0 github.com/KimMachineGun/automemlimit v0.6.0 diff --git a/go.sum b/go.sum index 08e45cb31..2f68fa93b 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ codeberg.org/gruf/go-sched v1.2.3 h1:H5ViDxxzOBR3uIyGBCf0eH8b1L8wMybOXcdtUUTXZHk codeberg.org/gruf/go-sched v1.2.3/go.mod h1:vT9uB6KWFIIwnG9vcPY2a0alYNoqdL1mSzRM8I+PK7A= codeberg.org/gruf/go-store/v2 v2.2.4 h1:8HO1Jh2gg7boQKA3hsDAIXd9zwieu5uXwDXEcTOD9js= codeberg.org/gruf/go-store/v2 v2.2.4/go.mod h1:zI4VWe5CpXAktYMtaBMrgA5QmO0sQH53LBRvfn1huys= -codeberg.org/gruf/go-structr v0.7.0 h1:gy0/wD7718HwJDoBMeMumk4+7veLrkumgCEOnCyzS8w= -codeberg.org/gruf/go-structr v0.7.0/go.mod h1:K1FXkUyO6N/JKt8aWqyQ8rtW7Z9ZmXKWP8mFAQ2OJjE= +codeberg.org/gruf/go-structr v0.8.0 h1:aZ+ziv2R6zTU16PW7B2d349wY9Du3mObc3hCeUIqtME= +codeberg.org/gruf/go-structr v0.8.0/go.mod h1:K1FXkUyO6N/JKt8aWqyQ8rtW7Z9ZmXKWP8mFAQ2OJjE= codeberg.org/superseriousbusiness/exif-terminator v0.7.0 h1:Y6VApSXhKqExG0H2hZ2JelRK4xmWdjDQjn13CpEfzko= codeberg.org/superseriousbusiness/exif-terminator v0.7.0/go.mod h1:gCWKduudUWFzsnixoMzu0FYVdxHWG+AbXnZ50DqxsUE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= diff --git a/vendor/codeberg.org/gruf/go-structr/cache.go b/vendor/codeberg.org/gruf/go-structr/cache.go index 1a2a07257..d9bcc58d3 100644 --- a/vendor/codeberg.org/gruf/go-structr/cache.go +++ b/vendor/codeberg.org/gruf/go-structr/cache.go @@ -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() diff --git a/vendor/codeberg.org/gruf/go-structr/queue.go b/vendor/codeberg.org/gruf/go-structr/queue.go index 70c18c839..91092790a 100644 --- a/vendor/codeberg.org/gruf/go-structr/queue.go +++ b/vendor/codeberg.org/gruf/go-structr/queue.go @@ -205,6 +205,24 @@ func (q *Queue[T]) Len() int { return l } +// Debug returns debug stats about queue. +func (q *Queue[T]) Debug() map[string]any { + m := make(map[string]any) + q.mutex.Lock() + m["queue"] = q.queue.len + indices := make(map[string]any) + m["indices"] = indices + for i := range q.indices { + var n uint64 + for _, list := range q.indices[i].data { + n += uint64(list.len) + } + indices[q.indices[i].name] = n + } + q.mutex.Unlock() + return m +} + func (q *Queue[T]) pop_n(n int, next func() *list_elem) []T { if next == nil { panic("nil fn") diff --git a/vendor/codeberg.org/gruf/go-structr/queue_ctx.go b/vendor/codeberg.org/gruf/go-structr/queue_ctx.go index d8843c1eb..766644c3c 100644 --- a/vendor/codeberg.org/gruf/go-structr/queue_ctx.go +++ b/vendor/codeberg.org/gruf/go-structr/queue_ctx.go @@ -64,6 +64,24 @@ func (q *QueueCtx[T]) Wait() <-chan struct{} { return ctx } +// Debug returns debug stats about queue. +func (q *QueueCtx[T]) Debug() map[string]any { + m := make(map[string]any) + q.mutex.Lock() + m["queue"] = q.queue.len + indices := make(map[string]any) + m["indices"] = indices + for i := range q.indices { + var n uint64 + for _, list := range q.indices[i].data { + n += uint64(list.len) + } + indices[q.indices[i].name] = n + } + q.mutex.Unlock() + return m +} + func (q *QueueCtx[T]) pop(ctx context.Context, next func() *list_elem) (T, bool) { if next == nil { panic("nil fn") diff --git a/vendor/modules.txt b/vendor/modules.txt index 995c81d6f..eca16ec29 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -62,7 +62,7 @@ codeberg.org/gruf/go-sched ## explicit; go 1.19 codeberg.org/gruf/go-store/v2/storage codeberg.org/gruf/go-store/v2/util -# codeberg.org/gruf/go-structr v0.7.0 +# codeberg.org/gruf/go-structr v0.8.0 ## explicit; go 1.21 codeberg.org/gruf/go-structr # codeberg.org/superseriousbusiness/exif-terminator v0.7.0