-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pkg/coveragedb: export data #5591
Comments
I am not sure yet, but most likely I will need function info. Lines are only useful for humans looking at reports visually. Any source code analysis is likely to operation on function level (e.g. what functions correspond to an interface, what functions are remotely reachable, what functions are reachable by non-privileged user, etc). |
{
"repo": "https://github.com/....",
"commit": "012345679012345679012345679012345679",
"managers": ["manager1", "manager2"],
"files": [
{
"path": "virt/kvm/kvm_main.c",
"functions": [
{
"func1": {"lines": [1, 2, 3], "hitcounts": [0, 1, 0]},
"func2": {"lines": [4, 5, 6], "hitcounts": [2, 2, 2]},
}
],
...
},
...
]
} Like this? Or do you think it makes sense to add "coverage" numbers? {
"repo": "https://github.com/....",
"commit": "012345679012345679012345679012345679",
"managers": ["manager1", "manager2"],
"coverage": 0.25,
"files": [
{
"path": "virt/kvm/kvm_main.c",
"coverage": 0.1,
"functions": [
{
"func1": {"coverage": 0.03, "lines": [1, 2, 3], "hitcounts": [0, 1, 0]},
"func2": {"coverage": 1.0, "lines": [4, 5, 6], "hitcounts": [2, 2, 2]},
}
],
...
},
...
]
} First version looks better to me... |
Is the only difference the derived "coverage" column? I would avoid exporting derived data, there may be multiple ways to calculate it, and there is infinite number of possible derived numbers. But I don't know yet what exactly data is needed in my case. |
Is your feature request related to a problem? Please describe.
@dvyukov asked to export the coverage data.
Describe the solution you'd like
1 big json about 15k files and 120 instrumentation points/file, total 1,8M instrumented points.
~10 bytes/point means ~20M. It'll be the well compressible data.
The structure may be something like:
It is a straightforward, cheap to export line coverage.
We'll be able to export full and per-manager data.
The text was updated successfully, but these errors were encountered: