From 90f7e5fa67dcf7b05c8aae54bacdf96f98c27faf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:48:14 -0400 Subject: [PATCH] fix(deps): update module github.com/efficientgo/core to v1.0.0-rc.3 (#14001) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 +-- .../efficientgo/core/testutil/testorbench.go | 34 +++++++++++++++++++ vendor/modules.txt | 2 +- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2857590e3857..37d4fc943783 100644 --- a/go.mod +++ b/go.mod @@ -120,7 +120,7 @@ require ( github.com/coder/quartz v0.1.0 github.com/d4l3k/messagediff v1.2.1 github.com/dolthub/swiss v0.2.1 - github.com/efficientgo/core v1.0.0-rc.2 + github.com/efficientgo/core v1.0.0-rc.3 github.com/fsnotify/fsnotify v1.7.0 github.com/gogo/googleapis v1.4.1 github.com/grafana/jsonparser v0.0.0-20240425183733-ea80629e1a32 diff --git a/go.sum b/go.sum index b889a88da3a1..bbf985b21ce1 100644 --- a/go.sum +++ b/go.sum @@ -585,8 +585,8 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= -github.com/efficientgo/core v1.0.0-rc.2/go.mod h1:FfGdkzWarkuzOlY04VY+bGfb1lWrjaL6x/GLcQ4vJps= +github.com/efficientgo/core v1.0.0-rc.3 h1:X6CdgycYWDcbYiJr1H1+lQGzx13o7bq3EUkbB9DsSPc= +github.com/efficientgo/core v1.0.0-rc.3/go.mod h1:FfGdkzWarkuzOlY04VY+bGfb1lWrjaL6x/GLcQ4vJps= github.com/efficientgo/e2e v0.13.1-0.20220922081603-45de9fc588a8 h1:UFLc39BcUXahSNCLUrKjNGZABMUZaS4M74EZvTRnq3k= github.com/efficientgo/e2e v0.13.1-0.20220922081603-45de9fc588a8/go.mod h1:Hi+sz0REtlhVZ8zcdeTC3j6LUEEpJpPtNjOaOKuNcgI= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= diff --git a/vendor/github.com/efficientgo/core/testutil/testorbench.go b/vendor/github.com/efficientgo/core/testutil/testorbench.go index c36b8877a126..69f3fe60f8c0 100644 --- a/vendor/github.com/efficientgo/core/testutil/testorbench.go +++ b/vendor/github.com/efficientgo/core/testutil/testorbench.go @@ -30,7 +30,13 @@ type TB interface { SetBytes(n int64) N() int + ResetTimer() + StartTimer() + StopTimer() + + ReportAllocs() + ReportMetric(n float64, unit string) } // tb implements TB as well as testing.TB interfaces. @@ -78,8 +84,36 @@ func (t *tb) ResetTimer() { } } +// StartTimer starts a timer, if it's a benchmark, noop otherwise. +func (t *tb) StartTimer() { + if b, ok := t.TB.(*testing.B); ok { + b.StartTimer() + } +} + +// StopTimer stops a timer, if it's a benchmark, noop otherwise. +func (t *tb) StopTimer() { + if b, ok := t.TB.(*testing.B); ok { + b.StopTimer() + } +} + // IsBenchmark returns true if it's a benchmark. func (t *tb) IsBenchmark() bool { _, ok := t.TB.(*testing.B) return ok } + +// ReportAllocs reports allocs if it's a benchmark, noop otherwise. +func (t *tb) ReportAllocs() { + if b, ok := t.TB.(*testing.B); ok { + b.ReportAllocs() + } +} + +// ReportMetric reports metrics if it's a benchmark, noop otherwise. +func (t *tb) ReportMetric(n float64, unit string) { + if b, ok := t.TB.(*testing.B); ok { + b.ReportMetric(n, unit) + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index a6444780a683..1e8afbaa9e66 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -669,7 +669,7 @@ github.com/eapache/queue # github.com/edsrzf/mmap-go v1.1.0 ## explicit; go 1.17 github.com/edsrzf/mmap-go -# github.com/efficientgo/core v1.0.0-rc.2 +# github.com/efficientgo/core v1.0.0-rc.3 ## explicit; go 1.17 github.com/efficientgo/core/errcapture github.com/efficientgo/core/errors