-
Notifications
You must be signed in to change notification settings - Fork 797
Detailed code coverage and benchmarking support for golang #1690
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
@Ankush-Goyal I am not sure about Percentage info yet, but Coverage info visulaization using Gutter/Highlight is already available. See https://github.com/golang/vscode-go/blob/master/docs/features.md#code-coverage and cc @pjweinb |
@hyangah I created a small even odd program to show the usecase. Attaching the screenshot below for UI difference between goland and VScode. The current interface on vscode is like a terminal based detailing for test. Goland provides a user interface which is easily navigable for different type of use cases such as test, profiling etc. Getting this implemented will improve user experience for golang developers. |
Thanks. It looks like you want CPU profile support. For gutter-style code coverage presentation, try https://github.com/golang/vscode-go/blob/master/docs/settings.md#gocoveragedecorator |
FYI, VSCode is adding support for coverage to the testing API. See microsoft/vscode#123713 for details on the proposed API. |
@hyangah CPU profile support is one part to it. Benchmarking, testing race condition, Memory profiling, flamegraph these are some of the extra pointers I can say,. Still I would say Testing, Benchmarking, Memory and CPU profiling should be given importance for starters. |
@Ankush-Goyal That is a very broad request; in Atlassian's terminology, I would call this an epic. If you break this down into multiple issues, one per feature (user stories), it would be much easier to address. |
@Ankush-Goyal There is an existing plan (discussed on #1579) to add profiling of tests and benchmarks and a way to view those profiles as a flow graph. #1724 covers creating diff profiles and #1725 covers profiling main functions. If you want additional features, I recommend you create specific issues. |
Closing. Thanks for sharing ideas. @Ankush-Goyal |
Is your feature request related to a problem? Please describe.
Can we implement a formal way of viewing code coverage like a gutter, highlight based and also percentage based for files.
Describe the solution you'd like
Gutter: it shows the lines of code covered by test cases on the left side similar to where debug points are shown
Highlight: shows the actual lines highlighted as different color codes
Percentage: shows a tabular format in percentages for folder as well as file level. Somewhat similar to how goland has done it.
Additional context
Goland supports a great ui for ease of testing. Just selecting option and it fires of the coverage. It would be great if we can get a similar feature in place.
Note: As per my research, vs code doesn't have something similar. Correct me if I am wrong and would help if you can provide a documentation or useful tutorial for it
The text was updated successfully, but these errors were encountered: