Generalized job ID filtering for job statistics

Job filtering according to partition has been implemented.