From 70df020be86521aebbe47c94384275b1a9c5cae6 Mon Sep 17 00:00:00 2001 From: Amogh Rathore Date: Thu, 12 Dec 2024 23:57:38 +0000 Subject: [PATCH] Remove unused GetPublishMetricsTicker method from stats engine --- agent/stats/engine.go | 5 ----- agent/stats/mock/engine.go | 15 --------------- 2 files changed, 20 deletions(-) diff --git a/agent/stats/engine.go b/agent/stats/engine.go index 10d2ab4f036..d75e2644c48 100644 --- a/agent/stats/engine.go +++ b/agent/stats/engine.go @@ -81,7 +81,6 @@ type Engine interface { GetTaskHealthMetrics() (*ecstcs.HealthMetadata, []*ecstcs.TaskHealth, error) GetPublishServiceConnectTickerInterval() int32 SetPublishServiceConnectTickerInterval(int32) - GetPublishMetricsTicker() *time.Ticker } // DockerStatsEngine is used to monitor docker container events and to report @@ -1083,10 +1082,6 @@ func (engine *DockerStatsEngine) SetPublishServiceConnectTickerInterval(publishS engine.publishServiceConnectTickerInterval = publishServiceConnectTickerInterval } -func (engine *DockerStatsEngine) GetPublishMetricsTicker() *time.Ticker { - return engine.publishMetricsTicker -} - func (engine *DockerStatsEngine) getEBSVolumeMetrics(taskArn string) []*ecstcs.VolumeMetric { task, err := engine.resolver.ResolveTaskByARN(taskArn) if err != nil { diff --git a/agent/stats/mock/engine.go b/agent/stats/mock/engine.go index e99d3d1e198..9499ae99e51 100644 --- a/agent/stats/mock/engine.go +++ b/agent/stats/mock/engine.go @@ -20,7 +20,6 @@ package mock_stats import ( reflect "reflect" - time "time" stats "github.com/aws/amazon-ecs-agent/ecs-agent/stats" ecstcs "github.com/aws/amazon-ecs-agent/ecs-agent/tcs/model/ecstcs" @@ -83,20 +82,6 @@ func (mr *MockEngineMockRecorder) GetInstanceMetrics(arg0 interface{}) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceMetrics", reflect.TypeOf((*MockEngine)(nil).GetInstanceMetrics), arg0) } -// GetPublishMetricsTicker mocks base method. -func (m *MockEngine) GetPublishMetricsTicker() *time.Ticker { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPublishMetricsTicker") - ret0, _ := ret[0].(*time.Ticker) - return ret0 -} - -// GetPublishMetricsTicker indicates an expected call of GetPublishMetricsTicker. -func (mr *MockEngineMockRecorder) GetPublishMetricsTicker() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPublishMetricsTicker", reflect.TypeOf((*MockEngine)(nil).GetPublishMetricsTicker)) -} - // GetPublishServiceConnectTickerInterval mocks base method. func (m *MockEngine) GetPublishServiceConnectTickerInterval() int32 { m.ctrl.T.Helper()