code: def getTotalCpuTimeAndMemoryUsage():
      
      me = resource.getrusage(resource.RUSAGE_SELF)
      childs = resource.getrusage(resource.RUSAGE_CHILDREN)
      totalCpuTime = me.ru_utime+me.ru_stime+childs.ru_utime+childs.ru_stime
      totalMemoryUsage = me.ru_maxrss+ me.ru_maxrss
      return totalCpuTime, totalMemoryUsage
docs: Gives the total cpu time and memory usage of itself and its children.