Skip to content
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

average coverage calculation #32

Open
asheet-bhaskar opened this issue Jul 24, 2017 · 1 comment
Open

average coverage calculation #32

asheet-bhaskar opened this issue Jul 24, 2017 · 1 comment
Labels

Comments

@asheet-bhaskar
Copy link

I tried to check code coverage with gocov and goreporter. I found that the value of code coverage i get using goreporter differs than the value i get using gocov.

for following stats

package percentage lines-covered
pkg-1 90.57% 48/53
pkg-2 83.08% 54/65
pkg-3 77.59% 135/174

  1. code coverage using goreporter is (90.57+83.08+77.59)/3 = 83.74% (average of percentage code coverage of individual package)
  2. code coverage using gocov is = (237*100)/292 = 81.16% (percentage of line covered in whole project).

My concern is which of the above two is more accurate?

@wgliang
Copy link
Collaborator

wgliang commented Jul 25, 2017

I think the benevolent see benevolence and the wise see wisdom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants