0

I need to measure the time that Firefox takes to build itself from the source code. Here's what I do normaly:

nohup ./mach build > my_log.log &

I then prepended time to it:

time nohup ./mach build > my_log.log &

However, this hasn't made it generate any report about the time spent, at the end of the my_log file.

Why not? How to fix it?

Kentuk
  • 1
  • 1

1 Answers1

1

In your second attempt you measure the execution time of nohup command itself. So to get the build time you should put time after nohup:

nohup time ./mach build >my_log.log  2>&1 &

Also redirect the STDERR is good practice.

And as mentioned in comment you can have dedicated log for time command:

nohup time -o build.time ./mach build >my_log.log  2>&1 &
Romeo Ninov
  • 5,263
  • 4
  • 20
  • 26