Expose build performance data to Prometheus
Currently we run build and forget about it. For Kubernetes
and Docker
we can read CPU/Memory/IO/Network usage over time and have very detailed build performance metrics.
We should expose them with Prometheus endpoint.
The data send to prometheus should be: per-project, per-used-machine, per-shortened-runner-token, per-stage (in which is build now).
Since we will have this data, we should also push summary (maximum, average, std-dev) of the performance to GitLab where we could show and quickly access that if needed. Maybe another way would be to print that at the end of build log with information about average CPU usage, maximum memory usage, IOPS and IO Read/Write, network Read/Write.