-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: add option to output timestamps along with command tracing #22526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that you can do
|
Right, but that primes the cache, which might mask some issues. |
And I'm willing to take on implementing this feature, once it is deemed as worthwhile to have. |
What do you mean "that primes the cache"? My point is that if you want to add timestamps to output you can do that by piping it through a timestamp-adding program (or script). |
I meant it runs the commands and thus the files end up in the file system cache, which affects the following execution. |
The more work we do in parallel, the less useful timestamps will be, and as @rsc notes you can already pipe the output of I don't think timestamps alone would are worth the complexity (particularly in terms of documentation). I'd be open to a general trace of the build (including both start and stop times, and produced in some standard structured form), but that's a matter for a separate proposal. |
I built a pretty decent (if I say so myself) tracer for cmd/go, demo'd in #15736. Perhaps someone would like to revive that? Note that at the end of that thread, Russ indicated he'd just as soon instead add timing information. So it seems like the two of you are headed in opposite directions. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
When you use the
-x
flag to build, it wold be useful to be able to pass in-t
too, to see the start time of each command to get a rough estimate on where the time is spent. On one server I was working on, a path was NFS mounted, and timestamps would have let me track down the slowdown quicker.What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: