code: void updateResourceCounters() {
      if (resourceCalculator == null) {
        return;
      }
      ProcResourceValues res = resourceCalculator.getProcResourceValues();
      long cpuTime = res.getCumulativeCpuTime();
      long pMem = res.getPhysicalMemorySize();
      long vMem = res.getVirtualMemorySize();
      long cpuJvmTime = this.jmxThreadInfoTracker.getCumulativeCPUTime();
      // Remove the CPU time consumed previously by JVM reuse
      cpuTime -= initCpuCumulativeTime;
      cpuJvmTime -= this.initJvmCpuCumulativeTime;
      counters.findCounter(Counter.CPU_MILLISECONDS).setValue(cpuTime);
      counters.findCounter(Counter.PHYSICAL_MEMORY_BYTES).setValue(pMem);
      counters.findCounter(Counter.VIRTUAL_MEMORY_BYTES).setValue(vMem);
      counters.findCounter(Counter.CPU_MILLISECONDS_JVM).setValue(cpuJvmTime);
      if(isMapTask()) { //Mapper Task
        counters.findCounter(MapCounter.MAP_CPU_MILLISECONDS).setValue(cpuTime);
      }
      else {
        counters.findCounter(ReduceCounter.REDUCE_CPU_MILLISECONDS).setValue(cpuTime);
      }
    }
docs: Update resource information counters