![Capture d’écran 2022-09-13 à 10.45.24.png](kKNIr8PtqI3G)


in the  [compute_logs_k8s_prepared](recipe:compute_logs_k8s_prepared) recipe, we compute the following measures :

1. Instant usage of resources : 
  -  **CPU_current**  : number of CPU cores used during the last minute. We use the information from "kubectl top" command : CPU_current = currentCPUMillicore / 1000
  -  **memory_MB**  : the memory used during the last minute. It corresponds to the maximum value between the pod's current memory usage and the requested memory from the process.
  
2. Cumulative usage of resources : 
   -  **cpu_time_in_minutes**  (in min) : it is estimated as the sum of the current CPU over each minute of the process. (e.g. : if there has been 0.5 CPU used for a processed that lasted 10mn, then cpu_time_in_minute = 0.5*10 = 5 minute of CPU usage)
   -  **memory_MB_minutes**  (in MB.min) : this is the sum over each minute of the memory_MB value.
   
   
  The [compute_logs_k8s_grouped_by_activity_id](recipe:compute_logs_k8s_grouped_by_activity_id) is used to aggregate each pod resources used by minute and by process.
  
  The [compute_logs_k8s_prepared_windows](recipe:compute_logs_k8s_prepared_windows) is used to take the latest log trace related to a process.



