diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/priority_queue/binary_heap.go (renamed from pkg/priorityqueue/binary_heap.go) | 0 | ||||
-rw-r--r-- | pkg/priority_queue/binary_heap_test.go (renamed from pkg/priorityqueue/binary_heap_test.go) | 0 | ||||
-rw-r--r-- | pkg/priority_queue/interface.go (renamed from pkg/priorityqueue/interface.go) | 0 | ||||
-rw-r--r-- | pkg/process/state.go | 8 |
4 files changed, 4 insertions, 4 deletions
diff --git a/pkg/priorityqueue/binary_heap.go b/pkg/priority_queue/binary_heap.go index e47dd2c8..e47dd2c8 100644 --- a/pkg/priorityqueue/binary_heap.go +++ b/pkg/priority_queue/binary_heap.go diff --git a/pkg/priorityqueue/binary_heap_test.go b/pkg/priority_queue/binary_heap_test.go index 06d0735c..06d0735c 100644 --- a/pkg/priorityqueue/binary_heap_test.go +++ b/pkg/priority_queue/binary_heap_test.go diff --git a/pkg/priorityqueue/interface.go b/pkg/priority_queue/interface.go index 8278dc8d..8278dc8d 100644 --- a/pkg/priorityqueue/interface.go +++ b/pkg/priority_queue/interface.go diff --git a/pkg/process/state.go b/pkg/process/state.go index 652ec77c..bfc3a287 100644 --- a/pkg/process/state.go +++ b/pkg/process/state.go @@ -32,20 +32,20 @@ type State struct { } // WorkerProcessState creates new worker state definition. -func WorkerProcessState(w worker.BaseProcess) (State, error) { +func WorkerProcessState(w worker.BaseProcess) (*State, error) { const op = errors.Op("worker_process_state") p, _ := process.NewProcess(int32(w.Pid())) i, err := p.MemoryInfo() if err != nil { - return State{}, errors.E(op, err) + return nil, errors.E(op, err) } percent, err := p.CPUPercent() if err != nil { - return State{}, err + return nil, err } - return State{ + return &State{ CPUPercent: percent, Pid: int(w.Pid()), Status: w.State().String(), |