mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #17031 from xelalexv/issue16425
Auto commit by PR queue bot
This commit is contained in:
commit
efa590727a
@ -34,7 +34,7 @@ func ConsumeCPU(millicores int, durationSec int) {
|
|||||||
arg1 := fmt.Sprintf("-millicores=%d", millicores)
|
arg1 := fmt.Sprintf("-millicores=%d", millicores)
|
||||||
arg2 := fmt.Sprintf("-duration-sec=%d", durationSec)
|
arg2 := fmt.Sprintf("-duration-sec=%d", durationSec)
|
||||||
consumeCPU := exec.Command(consumeCPUBinary, arg1, arg2)
|
consumeCPU := exec.Command(consumeCPUBinary, arg1, arg2)
|
||||||
consumeCPU.Start()
|
consumeCPU.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConsumeMem(megabytes int, durationSec int) {
|
func ConsumeMem(megabytes int, durationSec int) {
|
||||||
@ -43,7 +43,7 @@ func ConsumeMem(megabytes int, durationSec int) {
|
|||||||
durationSecString := strconv.Itoa(durationSec)
|
durationSecString := strconv.Itoa(durationSec)
|
||||||
// creating new consume memory process
|
// creating new consume memory process
|
||||||
consumeMem := exec.Command(consumeMemBinary, "-m", "1", "--vm-bytes", megabytesString, "--vm-hang", "0", "-t", durationSecString)
|
consumeMem := exec.Command(consumeMemBinary, "-m", "1", "--vm-bytes", megabytesString, "--vm-hang", "0", "-t", durationSecString)
|
||||||
consumeMem.Start()
|
consumeMem.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetCurrentStatus() {
|
func GetCurrentStatus() {
|
||||||
|
Loading…
Reference in New Issue
Block a user