Skip to content

Commit 9acc6e8

Browse files
authored
Update actions.py stress memory (#163)
Signed-off-by: ALupin813 <161851714+ALupin813@users.noreply.github.com>
1 parent 22b1f67 commit 9acc6e8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

chaosk8s/chaosmesh/stress/actions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def stress_memory(
111111
secrets: Secrets = None,
112112
) -> Dict[str, Any]:
113113
"""
114-
Stress the CPU to impact a process/container.
114+
Stress the memory to impact a process/container.
115115
116116
See: https://chaos-mesh.org/docs/simulate-heavy-stress-on-kubernetes/
117117
"""
@@ -125,7 +125,7 @@ def stress_memory(
125125
spec:
126126
selector: {}
127127
stressors:
128-
cpu: {}
128+
memory: {}
129129
"""
130130
)
131131
)
@@ -134,9 +134,9 @@ def stress_memory(
134134
r["metadata"]["ns"] = ns
135135

136136
s = r["spec"]
137-
c = s["stressors"]["cpu"]
137+
c = s["stressors"]["memory"]
138138
c["workers"] = workers
139-
c["load"] = size
139+
c["size"] = size
140140
c["time"] = time_to_get_to_size
141141
c["oomScoreAdj"] = oom_score
142142

0 commit comments

Comments
 (0)