Task #2237 Add code to group data by cpu and memory usages

- Created the code to group cpu data.