-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #267 from lindig/coverage
CP-17268 integrate coverage profiling
- Loading branch information
Showing
23 changed files
with
569 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Coverage Analysis | ||
|
||
This project can be compiled for coverage analysis using [bisect_ppx]. By | ||
default, this is not done. To compile for coverage analysis, do: | ||
|
||
make coverage | ||
make | ||
|
||
The `coverage` target adds the rules in `_tags.coverage` to the `_tags` | ||
file, which in turn causes all code to be compiled for coverage | ||
analysis. The `_tags.coverage` file could be tweaked to control which | ||
files get instrumented. | ||
|
||
## Support Files | ||
|
||
See [profiling/coverage.ml](./profiling/coverage.ml) for the run-time | ||
setup of coverage profiling. This code has no effect when not profiling | ||
during execution. Once [bixect_ppx] has better defaults we could get rid | ||
of it. | ||
|
||
## Execution and Logging | ||
|
||
During program execution, a binary writes coverage data to | ||
|
||
/tmp/bisect-<binary>-*.out | ||
|
||
This can be overridden by setting the `BISECT_FILE` environment | ||
variable, which is otherwise set at startup using the code in | ||
`profiling/coverage.ml`; | ||
|
||
## Analysis | ||
|
||
See the [bisect_ppx] documentation for details but try from the | ||
top-level directory: | ||
|
||
bisect-ppx-report -I _build -html coverage /tmp/bisect-*.out | ||
|
||
This creates an HTML document in [coverage/](./coverage]. | ||
|
||
[bisect_ppx]: https://github.com/aantron/bisect_ppx | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.