This commit is contained in:
Abhishek Pandey 2023-10-06 15:02:52 +05:30
parent 8c597c47b0
commit 633524379d
2 changed files with 12 additions and 12 deletions

View File

@ -1,6 +1,6 @@
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

View File

@ -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).
// Expectation is for users to call this in a goroutine. Any signal or close() on the stop chan
// will exit the loop.
func dumpMetrics(ctx context.Context, stop <-chan struct{}, sig *metrics.InmemSignal) {
tock := time.NewTicker(reportInterval)
// func dumpMetrics(ctx context.Context, stop <-chan struct{}, sig *metrics.InmemSignal) {
// tock := time.NewTicker(reportInterval)
for {
select {
case <-tock.C:
signalDump(ctx)
case <-stop:
return
}
}
}
// for {
// select {
// case <-tock.C:
// signalDump(ctx)
// case <-stop:
// return
// }
// }
// }
// Inc increments the given category by 1.
func Inc(cat metricsCategory, keys ...string) {