On Fri, Apr 27, 2018 at 8:17 AM Prateek Rungta <prung...@gmail.com> wrote:
> Would people be opposed to changing that behavior? I guess so. > I’ve always thought of the time returned as the time to execute the command. Doesn’t matter to me if it’s having to compile or not. The use the time command. I do not understand, what's the problem. Two different methods report two different values because they measure two different things. What's the point of somehow forcing the values to be the same? Possibly illustrative experiment: jnml@4670:~/src/github.com/cznic/ql> go clean -cache jnml@4670:~/src/github.com/cznic/ql> time go test PASS ok github.com/cznic/ql 9.607s real 0m11.708s user 0m8.006s sys 0m0.489s jnml@4670:~/src/github.com/cznic/ql> go test -c && time ./ql.test PASS real 0m9.671s user 0m3.551s sys 0m0.171s jnml@4670:~/src/github.com/cznic/ql> Above we can see the reported 6.7 seconds are in both cases the time to execute the test binary per se. Additional 2.1 seconds were spent in producing the binary. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.