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


Within the  [compute_logs_k8s_prepared](recipe:compute_logs_k8s_prepared) recipe, the following measures are computed :

1. Instant usage of resources : 
  -  **CPU_current**  : the 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) : 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) : 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) recipe aggregates each pod resources used by minute and by process.
  
  The [compute_logs_k8s_prepared_windows](recipe:compute_logs_k8s_prepared_windows) recipe is used to take the latest log trace related to a process.



