diff --git a/pkg/storage/device/device.go b/pkg/storage/device/device.go index dd0b27a..09bbd5c 100644 --- a/pkg/storage/device/device.go +++ b/pkg/storage/device/device.go @@ -309,7 +309,7 @@ func NewDeviceWithLoggingMetrics(ds *config.DeviceSchema, log types.Logger, met dirtyBlockSize := bs >> ds.Sync.Config.BlockShift - //numBlocks := (int(prov.Size()) + bs - 1) / bs + // numBlocks := (int(prov.Size()) + bs - 1) / bs vm := volatilitymonitor.NewVolatilityMonitor(prov, bs, syncVolatilityExpiry) @@ -322,7 +322,7 @@ func NewDeviceWithLoggingMetrics(ds *config.DeviceSchema, log types.Logger, met // Setup a block order orderer := vm - //orderer := blocks.NewAnyBlockOrder(numBlocks, nil) + // orderer := blocks.NewAnyBlockOrder(numBlocks, nil) orderer.AddAll() checkPeriod, err := time.ParseDuration(ds.Sync.Config.CheckPeriod) diff --git a/pkg/storage/metrics/prometheus/prometheus.go b/pkg/storage/metrics/prometheus/prometheus.go index cc2a703..00289bb 100644 --- a/pkg/storage/metrics/prometheus/prometheus.go +++ b/pkg/storage/metrics/prometheus/prometheus.go @@ -475,26 +475,6 @@ func New(reg prometheus.Registerer, config *MetricsConfig) *Metrics { met.waitingCacheAvailableRemote, ) - // Do a test histogram... - // This *seems* to work with heatmap set to time series... - // query is: sum(silo_test_test1_bucket) by (le) - test1 := prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: config.Namespace, Subsystem: "test", Name: "test1_bucket", Help: "test1_sum"}, []string{"le"}) - // test1sum := prometheus.NewGauge(prometheus.GaugeOpts{ - // Namespace: config.Namespace, Subsystem: "test", Name: "test1_sum", Help: "test1_sum"}) - // test1count := prometheus.NewGauge(prometheus.GaugeOpts{ - // Namespace: config.Namespace, Subsystem: "test", Name: "test1_count", Help: "test1_sum"}) - reg.MustRegister(test1) //, test1sum, test1count) - - test1.WithLabelValues("1").Set(10) - test1.WithLabelValues("2").Set(20) - test1.WithLabelValues("3").Set(10) - test1.WithLabelValues("4").Set(30) - test1.WithLabelValues("6").Set(10) - - // test1sum.Set(10 + 20 + 10 + 30 + 10) - // test1count.Set(5) - return met } diff --git a/pkg/storage/migrator/migrator_s3_assisted_test.go b/pkg/storage/migrator/migrator_s3_assisted_test.go index 0515c94..33a6388 100644 --- a/pkg/storage/migrator/migrator_s3_assisted_test.go +++ b/pkg/storage/migrator/migrator_s3_assisted_test.go @@ -158,7 +158,7 @@ func TestMigratorS3Assisted(t *testing.T) { _ = destFrom.HandleDevInfo() }() go func() { - _ = destFrom.HandleEvent(func(p *packets.Event) {}) + _ = destFrom.HandleEvent(func(_ *packets.Event) {}) }() } @@ -205,9 +205,8 @@ func TestMigratorS3Assisted(t *testing.T) { syncRunning := storage.SendSiloEvent(provDest, "sync.running", nil)[0].(bool) if syncRunning { break - } else { - time.Sleep(100 * time.Millisecond) } + time.Sleep(100 * time.Millisecond) } // This will end with migration completed, and consumer Locked. @@ -297,7 +296,7 @@ func TestMigratorS3AssistedChangeSource(t *testing.T) { _ = destFrom.HandleDevInfo() }() go func() { - _ = destFrom.HandleEvent(func(p *packets.Event) {}) + _ = destFrom.HandleEvent(func(_ *packets.Event) {}) }() } @@ -357,9 +356,8 @@ func TestMigratorS3AssistedChangeSource(t *testing.T) { syncRunning := storage.SendSiloEvent(provDest, "sync.running", nil)[0].(bool) if syncRunning { break - } else { - time.Sleep(100 * time.Millisecond) } + time.Sleep(100 * time.Millisecond) } // This will end with migration completed, and consumer Locked.