Skip to content

Commit

Permalink
Merge pull request #584 from mackerelio/remove-memory-active-metrics
Browse files Browse the repository at this point in the history
Remove memory.active and inactive metrics
  • Loading branch information
itchyny committed Jul 26, 2019
2 parents 501889d + 26d9d53 commit 026b1f0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 20 deletions.
4 changes: 1 addition & 3 deletions metrics/darwin/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MemoryGenerator collect memory usage
`memory.{metric}`: using memory size retrieved from `vm_stat`
metric = "total", "free", "used", "cached", "active", "inactive"
metric = "total", "free", "used", "cached"
graph: stacks `memory.{metric}`
*/
Expand All @@ -34,8 +34,6 @@ func (g *MemoryGenerator) Generate() (metrics.Values, error) {
"memory.used": float64(memory.Used),
"memory.cached": float64(memory.Cached),
"memory.free": float64(memory.Free),
"memory.active": float64(memory.Active),
"memory.inactive": float64(memory.Inactive),
"memory.swap_total": float64(memory.SwapTotal),
"memory.swap_free": float64(memory.SwapFree),
}
Expand Down
2 changes: 0 additions & 2 deletions metrics/darwin/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ func TestMemoryGenerator(t *testing.T) {
"total",
"free",
"cached",
"active",
"inactive",
"used",
"swap_total",
"swap_free",
Expand Down
8 changes: 0 additions & 8 deletions metrics/freebsd/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ func (g *MemoryGenerator) Generate() (metrics.Values, error) {
k = k[0 : len(k)-1]
}
switch k {
case "Active":
ret["memory.active"] = v
case "Inact":
ret["memory.inactive"] = v
/*
case "Wired":
ret["memory.wired"] = v
*/
case "Cache":
ret["memory.cached"] = v
case "Buf":
Expand Down
2 changes: 0 additions & 2 deletions metrics/freebsd/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func TestMemoryGenerator(t *testing.T) {
"free",
"buffers",
"cached",
"active",
"inactive",
"swap_total",
"swap_free",
} {
Expand Down
4 changes: 1 addition & 3 deletions metrics/linux/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MemoryGenerator collect memory usage
`memory.{metric}`: using memory size[KiB] retrieved from /proc/meminfo
metric = "total", "free", "buffers", "cached", "active", "inactive", "swap_cached", "swap_total", "swap_free"
metric = "total", "free", "buffers", "cached", "swap_cached", "swap_total", "swap_free"
Metrics "used" is calculated by
(total - available) when MemAvailable is available in /proc/meminfo and
Expand All @@ -37,8 +37,6 @@ func (g *MemoryGenerator) Generate() (metrics.Values, error) {
ret := map[string]float64{
"memory.total": float64(mem.Total),
"memory.used": float64(mem.Used),
"memory.active": float64(mem.Active),
"memory.inactive": float64(mem.Inactive),
"memory.swap_total": float64(mem.SwapTotal),
"memory.swap_cached": float64(mem.SwapCached),
"memory.swap_free": float64(mem.SwapFree),
Expand Down
2 changes: 0 additions & 2 deletions metrics/linux/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ func TestMemoryGenerator(t *testing.T) {
metricNames := []string{
"total",
"mem_available",
"active",
"inactive",
"swap_cached",
"swap_total",
"swap_free",
Expand Down

0 comments on commit 026b1f0

Please sign in to comment.