Collect metrics on build stages

Merged Alessio Caiazza requested to merge 2505-collecting-metrics into master

What does this MR do?

Wrap each stage executions with a timestamped section identifier.

Sample output here: https://gitlab.com/nolith/ci-tests/-/jobs/33067371

Why was this MR needed?

See #2505 and https://gitlab.com/gitlab-org/gitlab-ce/issues/37970

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Closes #2505