diff --git a/src/core/metrics/metrics_util.go b/src/core/metrics/metrics_util.go index 288cca0132..43b2ea7381 100644 --- a/src/core/metrics/metrics_util.go +++ b/src/core/metrics/metrics_util.go @@ -140,7 +140,6 @@ func GetCalculationMap() map[string]string { "system.mem.shared": "avg", "system.mem.total": "avg", "system.mem.used": "avg", - "system.mem.used.all": "avg", "system.load.1": "avg", "system.load.15": "avg", "system.load.5": "avg", diff --git a/src/core/metrics/sources/mem.go b/src/core/metrics/sources/mem.go index 6531b8b7cc..77e801ca8e 100644 --- a/src/core/metrics/sources/mem.go +++ b/src/core/metrics/sources/mem.go @@ -53,7 +53,6 @@ func (c *VirtualMemory) Collect(ctx context.Context, wg *sync.WaitGroup, m chan< simpleMetrics := c.convertSamplesToSimpleMetrics(map[string]float64{ "total": float64(memstats.Total), "used": float64(memstats.Used), - "used.all": float64(memstats.Total - memstats.Available), "cached": float64(memstats.Cached), "buffered": float64(memstats.Buffers), "shared": float64(memstats.Shared), diff --git a/src/core/metrics/sources/mem_test.go b/src/core/metrics/sources/mem_test.go index 901819d33a..1847f453f3 100644 --- a/src/core/metrics/sources/mem_test.go +++ b/src/core/metrics/sources/mem_test.go @@ -79,7 +79,6 @@ func TestVirtualMemoryCollect(t *testing.T) { "test.mem.shared", "test.mem.total", "test.mem.used", - "test.mem.used.all", } assert.Equal(t, expected, actualMetricNames) diff --git a/test/integration/api/api_test.go b/test/integration/api/api_test.go index 1f648d9b5d..8536683b57 100644 --- a/test/integration/api/api_test.go +++ b/test/integration/api/api_test.go @@ -90,10 +90,6 @@ func TestAPI_Metrics(t *testing.T) { value, _ := strconv.ParseFloat(metric[1], 64) assert.Greater(t, value, float64(0)) - case strings.Contains(metric[0], "system_mem_used_all"): - value, _ := strconv.ParseFloat(metric[1], 64) - assert.Greater(t, value, float64(0)) - case strings.Contains(metric[0], "container_cpu_cores"): value, _ := strconv.ParseFloat(metric[1], 64) assert.Greater(t, value, float64(0)) diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go index 288cca0132..43b2ea7381 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go @@ -140,7 +140,6 @@ func GetCalculationMap() map[string]string { "system.mem.shared": "avg", "system.mem.total": "avg", "system.mem.used": "avg", - "system.mem.used.all": "avg", "system.load.1": "avg", "system.load.15": "avg", "system.load.5": "avg", diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go index 6531b8b7cc..77e801ca8e 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go @@ -53,7 +53,6 @@ func (c *VirtualMemory) Collect(ctx context.Context, wg *sync.WaitGroup, m chan< simpleMetrics := c.convertSamplesToSimpleMetrics(map[string]float64{ "total": float64(memstats.Total), "used": float64(memstats.Used), - "used.all": float64(memstats.Total - memstats.Available), "cached": float64(memstats.Cached), "buffered": float64(memstats.Buffers), "shared": float64(memstats.Shared),