Skip to content

Commit 800e94c

Browse files
authored
Merge pull request #3574 from arshadd-b/add-container-mem-usage-measurement
Add measurement to check memory usage in benchmark list job
2 parents 003a587 + f4dcfb3 commit 800e94c

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

clusterloader2/testing/list/modules/measurements.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Input params
44
# Valid actions: "start", "gather"
55
{{$action := .action}}
6+
{{$ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD := DefaultParam .CL2_ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD_MEASUREMENT true}}
7+
{{$APISERVER_MEMORY_THRESHOLD_MEGABYTES := DefaultParam .CL2_APISERVER_MEMORY_THRESHOLD_MEGABYTES 4000}}
68

79

810
steps:
@@ -17,4 +19,27 @@ steps:
1719
- Identifier: TestMetrics
1820
Method: TestMetrics
1921
Params:
20-
action: {{$action}}
22+
action: {{$action}}
23+
{{if $ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD}}
24+
- Identifier: APIServerMemoryUsage
25+
Method: GenericPrometheusQuery
26+
Params:
27+
action: {{$action}}
28+
metricName: kube-apiserver memory usage
29+
metricVersion: v1
30+
enableViolations: true
31+
unit: MiB
32+
dimensions:
33+
- container
34+
queries:
35+
- name: MaxMemory
36+
query: |
37+
max_over_time(
38+
sum(
39+
container_memory_working_set_bytes{namespace="monitoring", pod=~"kube-apiserver.*"}
40+
/ 1024 / 1024
41+
)[%v:])
42+
threshold: {{$APISERVER_MEMORY_THRESHOLD_MEGABYTES}}
43+
requireSamples: false
44+
lowerBound: false
45+
{{end}}

0 commit comments

Comments
 (0)