- It calculates the total CPU hours spent by all the pods in given namespace for chosen time period (say a month). But instead of choosing "actual" value for each 1-minute datapoint, it chooses max value of all the per-minute data point and calculates per hour value by that max * 60.
sum_over_time(
(
60 * (max_over_time(sum(rate(container_cpu_usage_seconds_total{namespace="", pod=~".*", container!=""}[1m]))[1h:1m]))
)[$__range:1h] # sum over the time period choosen (e.g: previous month)
)