I'm currently measuring the compile time of a C++ project with time. The real field is very helpful because it clearly indicates the time the compilation spends in the real world but the big drawback behind this is that the time spent by the compilation depends on the computer activity (if I'm doing a lot of tasks on the computer the compilation will be slower and vice versa). I read that it could be interesting to measure compile time by adding both user and sys times but I did several tries and the times measured were a lot different everytime so I don't think this technique is very reliable.
My problem today is that the best way I found to measure compile time is with the real field of the time command but I don't want to do nothing on the computer during this time just to have an accurate compile time measure since I also need to work.
Does anyone know a good alternative to do this ?
I think it can be even harder to find a good measurement technique because the compilation is multithreaded and so the compile time perceived by the system can be very high while it's much lower.
Thx!