diff options
author | Valery Piashchynski <[email protected]> | 2021-12-01 18:35:28 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-12-01 18:35:28 +0300 |
commit | 005bce86625b8fffdb3657103ee5589cbb6eed87 (patch) | |
tree | 15adef89d99954a71f5c45f8748ed7e66e57d7c4 /state/process/state.go | |
parent | 859a9f696f732fa58dd49427a936fd0fecc0bc7d (diff) |
improve codecov
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'state/process/state.go')
-rw-r--r-- | state/process/state.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/state/process/state.go b/state/process/state.go index f88f8b03..d49d526f 100644 --- a/state/process/state.go +++ b/state/process/state.go @@ -54,23 +54,3 @@ func WorkerProcessState(w worker.BaseProcess) (*State, error) { MemoryUsage: i.RSS, }, nil } - -func GeneralProcessState(pid int, command string) (State, error) { - const op = errors.Op("process_state") - p, _ := process.NewProcess(int32(pid)) - i, err := p.MemoryInfo() - if err != nil { - return State{}, errors.E(op, err) - } - percent, err := p.CPUPercent() - if err != nil { - return State{}, err - } - - return State{ - CPUPercent: percent, - Pid: pid, - MemoryUsage: i.RSS, - Command: command, - }, nil -} |