Improved performance of process check
Improved performance of process check

Rearrange for loops and conditional statements speeds up
the process check from 1.115s to 0.812s

Change-Id: I790014c87f3aed95acfa29823d6c5771f3fcf005

sapcc/monasca-agent,sapcc/monasca-agent,sapcc/monasca-agent