-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: align package duration values #15944
Comments
Maybe I shouldn't be conflating the two but if package duration values are aligned, then people might expect the same for individual tests. One problem with aligning for individual tests is the case of subtests:
If all the times were aligned it would be confusing to sort since the time next to a node in a subtest tree is the cumulative time of all its descendants. You would be including cumulative values with non-cumulative values. Maybe the gain to package durations is enough of a win that people wouldn't mind the inconsistency between packages and individual tests. For completeness, I should mention that the 1.10 release includes:
I still think the use case presented by the OP is significant for a human and the new json functionality is kind of heavyweight for just looking around at test performance. |
@meirf - I opened this issue before subtests were released with go 1.7--I probably wasn't thinking about their effect. I don't see a way to move this issue forward and I'm included to close it. |
It would still be possible to align the times for each level.
Compatibility with #24929 seems to require that we move the time to the beginning instead of the end, since we won't know the maximum line length until all of the subtests have at least started. |
@bcmills - Yes, that's true. Good point. |
I don't believe we should change the default output. That will break existing test output processors, both programs and people's habits, for only a fairly small benefit. And not everyone will prefer the new output either (I know I don't), so it's a significant churn for what is not a clear win. People who want alternate displays should build them by using go test -json and processing the JSON. |
go version go1.6.2 darwin/amd64
In the spirit of #10594 I propose that the duration of each package be aligned vertically for ease of comparison and to make sorting by duration a more obvious option:
The text was updated successfully, but these errors were encountered: