Add LimitMode and Resources.CPU.IsThrottling to process state

This commit is contained in:
Ingo Oppermann
2023-07-17 21:45:19 +02:00
parent 5b075ed54b
commit 8a8ff6d4f4
8 changed files with 66 additions and 26 deletions

View File

@@ -1576,6 +1576,7 @@ func (r *restream) GetProcessState(id app.ProcessID) (*app.State, error) {
state.Time = status.Time.Unix()
state.Memory = status.Memory.Current
state.CPU = status.CPU.Current / status.CPU.NCPU
state.LimitMode = status.LimitMode
state.Resources.CPU = status.CPU
state.Resources.Memory = status.Memory
state.Duration = status.Duration.Round(10 * time.Millisecond).Seconds()