Skip to content

Commit f95b7b9

Browse files
committed
update new measurement in list
1 parent ac0994e commit f95b7b9

File tree

2 files changed

+19
-216
lines changed

2 files changed

+19
-216
lines changed

clusterloader2/pkg/measurement/common/container_memory_usage.go

Lines changed: 0 additions & 211 deletions
This file was deleted.

clusterloader2/testing/list/modules/measurements.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Valid actions: "start", "gather"
55
{{$action := .action}}
66
{{$ENABLE_CONTAINER_MEMORY_USAGE_MEASUREMENT := DefaultParam .CL2_ENABLE_CONTAINER_MEMORY_USAGE_MEASUREMENT true}}
7-
{{$CONTAINER_MEMORY_THRESHOLD := DefaultParam .CL2_CONTAINER_MEMORY_THRESHOLD 1}}
7+
{{$CONTAINER_MEMORY_THRESHOLD := DefaultParam .CL2_CONTAINER_MEMORY_THRESHOLD 100}}
88

99

1010
steps:
@@ -21,10 +21,24 @@ steps:
2121
Params:
2222
action: {{$action}}
2323
{{if $ENABLE_CONTAINER_MEMORY_USAGE_MEASUREMENT}}
24-
- Identifier: ContainerMemoryUsage
25-
Method: ContainerMemoryUsage
24+
- Identifier: APIServerMemoryUsage
25+
Method: GenericPrometheusQuery
2626
Params:
2727
action: {{$action}}
28-
threshold: {{$CONTAINER_MEMORY_THRESHOLD}}
29-
pollFrequency: 15s
28+
metricName: kube-apiserver memory usage
29+
metricVersion: v1
30+
unit: MiB
31+
dimensions:
32+
- container
33+
queries:
34+
- name: MaxMemory
35+
query: |
36+
max_over_time(
37+
sum(
38+
container_memory_working_set_bytes{namespace="monitoring", pod=~"kube-apiserver.*"}
39+
/ 1024 / 1024
40+
)[%v:])
41+
threshold: {{$CONTAINER_MEMORY_THRESHOLD}}
42+
requireSamples: false
43+
lowerBound: false
3044
{{end}}

0 commit comments

Comments
 (0)