Skip to content

Commit

Permalink
[corechecks/containers] Rename container.memory.peak to container.mem…
Browse files Browse the repository at this point in the history
…ory.usage.peak (#19581)
  • Loading branch information
davidor authored Sep 21, 2023
1 parent 39704c5 commit 566f206
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/collector/corechecks/containers/generic/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (p *Processor) processContainer(sender sender.Sender, tags []string, contai
p.sendMetric(sender.Gauge, "container.memory.working_set", containerStats.Memory.PrivateWorkingSet, tags) // Windows
p.sendMetric(sender.Gauge, "container.memory.commit", containerStats.Memory.CommitBytes, tags)
p.sendMetric(sender.Gauge, "container.memory.commit.peak", containerStats.Memory.CommitPeakBytes, tags)
p.sendMetric(sender.Gauge, "container.memory.peak", containerStats.Memory.Peak, tags)
p.sendMetric(sender.Gauge, "container.memory.usage.peak", containerStats.Memory.Peak, tags)
p.sendMetric(sender.Rate, "container.memory.partial_stall", containerStats.Memory.PartialStallTime, tags)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestProcessorRunFullStatsLinux(t *testing.T) {
mockSender.AssertMetric(t, "Gauge", "container.memory.working_set", 350, "", expectedTags)
mockSender.AssertMetric(t, "Gauge", "container.memory.swap", 0, "", expectedTags)
mockSender.AssertMetric(t, "Gauge", "container.memory.oom_events", 10, "", expectedTags)
mockSender.AssertMetric(t, "Gauge", "container.memory.peak", 50000, "", expectedTags)
mockSender.AssertMetric(t, "Gauge", "container.memory.usage.peak", 50000, "", expectedTags)
mockSender.AssertMetric(t, "Rate", "container.memory.partial_stall", 97000, "", expectedTags)

mockSender.AssertMetric(t, "Rate", "container.io.partial_stall", 98000, "", expectedTags)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
---
enhancements:
- |
Added the ``container.memory.peak`` metric to the container check. It shows the maximum memory usage recorded since the container started.
Added the ``container.memory.usage.peak`` metric to the container check. It shows the maximum memory usage recorded since the container started.

0 comments on commit 566f206

Please sign in to comment.