Skip to content

Commit

Permalink
deprecate used all metric
Browse files Browse the repository at this point in the history
  • Loading branch information
aphralG committed Oct 3, 2023
1 parent 6b7d4dc commit c6a86eb
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/core/metrics/metrics_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/core/metrics/sources/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion src/core/metrics/sources/mem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions test/integration/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6a86eb

Please sign in to comment.