1.20
This commit is contained in:
parent
8c597c47b0
commit
633524379d
@ -1,6 +1,6 @@
|
|||||||
module github.com/alcionai/corso/src
|
module github.com/alcionai/corso/src
|
||||||
|
|
||||||
go 1.21
|
go 1.20
|
||||||
|
|
||||||
replace github.com/kopia/kopia => github.com/alcionai/kopia v0.12.2-0.20230822191057-17d4deff94a3
|
replace github.com/kopia/kopia => github.com/alcionai/kopia v0.12.2-0.20230822191057-17d4deff94a3
|
||||||
|
|
||||||
|
|||||||
@ -267,18 +267,18 @@ func NewMetrics(ctx context.Context, w io.Writer) (context.Context, func()) {
|
|||||||
// it to dump metrics to the provided writer (which should be the logger).
|
// it to dump metrics to the provided writer (which should be the logger).
|
||||||
// Expectation is for users to call this in a goroutine. Any signal or close() on the stop chan
|
// Expectation is for users to call this in a goroutine. Any signal or close() on the stop chan
|
||||||
// will exit the loop.
|
// will exit the loop.
|
||||||
func dumpMetrics(ctx context.Context, stop <-chan struct{}, sig *metrics.InmemSignal) {
|
// func dumpMetrics(ctx context.Context, stop <-chan struct{}, sig *metrics.InmemSignal) {
|
||||||
tock := time.NewTicker(reportInterval)
|
// tock := time.NewTicker(reportInterval)
|
||||||
|
|
||||||
for {
|
// for {
|
||||||
select {
|
// select {
|
||||||
case <-tock.C:
|
// case <-tock.C:
|
||||||
signalDump(ctx)
|
// signalDump(ctx)
|
||||||
case <-stop:
|
// case <-stop:
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Inc increments the given category by 1.
|
// Inc increments the given category by 1.
|
||||||
func Inc(cat metricsCategory, keys ...string) {
|
func Inc(cat metricsCategory, keys ...string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user