An escript to analyse coverage difference reported at coveralls.io service.
Draft version of the tool created by fenek.
$ rebar3 escriptize
$ cd _build/default/bin/
$ ./coverage_diff [-c cache_directory] [--md] build1 build2
-c cache_directory
Loading of the data from coveralls.io takes time, it has sence to cache it if
want to make a couple of comparisons between different builds
--md
generate markdown report, useful if you want to add report as comment to GitHub.
Diff table:
Cov1/Cov2 - coverage in build1/build2
dCov - coverage difference
dR - difference in number of relevant (coverable) code lines
dN - difference in number of noncovered (relevant) code lines
New/Removed files table:
Rel - number of relevant code lines in the file
Non - number of noncovered code line
$ ./coverage_diff -c . 14118700 14117699
coverage_diff:main(["-c",".","14118700","14117699"])
================================================================================
Total coverage for 14118700: 66.616%
Total coverage for 14117699: 70.859%
Noncovered lines count delta: 1452
================================================================================
| File | Cov1 | Cov2 | dCov | dR | dN |
|--------------------------------|---------|----------|-----------|-----|-----|
| mongoose_riak_sup.erl | 0.000% | 100.000% | -100.000% | 0 | 19 |
| mam_message_xml.erl | 0.000% | 100.000% | -100.000% | 0 | 3 |
| mod_offline_riak.erl | 0.000% | 96.429% | -96.429% | 0 | 54 |
| mod_last_riak.erl | 0.000% | 95.238% | -95.238% | 0 | 20 |
| mod_roster_riak.erl | 0.000% | 94.118% | -94.118% | 0 | 64 |
| mod_vcard_riak.erl | 0.000% | 91.525% | -91.525% | 0 | 54 |
| mod_mam_riak_timed_arch_yz.erl | 0.000% | 87.963% | -87.963% | 0 | 190 |
| mongoose_riak.erl | 13.889% | 97.222% | -83.333% | 0 | 30 |
| mod_private_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 18 |
| mod_privacy_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 36 |
| ejabberd_auth_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 63 |
| mongoose_fips.erl | 41.176% | 75.000% | -33.824% | 13 | 9 |
| ejabberd_binary.erl | 55.556% | 88.889% | -33.333% | 0 | 3 |
| mongoose_lib.erl | 41.667% | 50.000% | -8.333% | 0 | 1 |
| ELDAPv3.erl | 14.709% | 22.713% | -8.004% | 690 | 690 |
| mod_mam_utils.erl | 82.979% | 88.339% | -5.360% | -1 | 15 |
| eldap_filter_yecc.erl | 15.236% | 20.233% | -4.996% | 141 | 141 |
| mod_mam_odbc_prefs.erl | 95.604% | 98.901% | -3.297% | 0 | 3 |
| mod_bosh_socket.erl | 80.464% | 81.457% | -0.993% | 0 | 3 |
| p1_fsm_old.erl | 35.849% | 36.604% | -0.755% | 0 | 2 |
| mongoose_rdbms.erl | 68.493% | 69.178% | -0.685% | 0 | 1 |
| ejabberd_config.erl | 63.347% | 63.771% | -0.424% | 0 | 2 |
| ejabberd_app.erl | 83.333% | 83.750% | -0.417% | -2 | 0 |
| mod_mam.erl | 89.577% | 89.902% | -0.326% | 0 | 1 |
| mod_muc.erl | 68.144% | 68.421% | -0.277% | 0 | 1 |
================================================================================
| Removed files | Coverage | Rel | Non |
|---------------------------|----------|-----|-----|
| mongoose_deprecations.erl | 96.429% | 28 | 1 |
================================================================================
$ ./coverage_diff --md -c . 14118700 14117699
coverage_diff:main(["--md","-c",".","14118700","14117699"])
================================================================================
Total coverage for 14118700: 66.616%
Total coverage for 14117699: 70.859%
Noncovered lines count delta: 1452
================================================================================
coverage decrease analysis between 14118700 and 14117699
File | Cov1 | Cov2 | dCov | dR | dN |
---|---|---|---|---|---|
mongoose_riak_sup.erl | 0.000% | 100.000% | -100.000% | 0 | 19 |
mam_message_xml.erl | 0.000% | 100.000% | -100.000% | 0 | 3 |
mod_offline_riak.erl | 0.000% | 96.429% | -96.429% | 0 | 54 |
mod_last_riak.erl | 0.000% | 95.238% | -95.238% | 0 | 20 |
mod_roster_riak.erl | 0.000% | 94.118% | -94.118% | 0 | 64 |
mod_vcard_riak.erl | 0.000% | 91.525% | -91.525% | 0 | 54 |
mod_mam_riak_timed_arch_yz.erl | 0.000% | 87.963% | -87.963% | 0 | 190 |
mongoose_riak.erl | 13.889% | 97.222% | -83.333% | 0 | 30 |
mod_private_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 18 |
mod_privacy_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 36 |
ejabberd_auth_riak.erl | 0.000% | 81.818% | -81.818% | 0 | 63 |
mongoose_fips.erl | 41.176% | 75.000% | -33.824% | 13 | 9 |
ejabberd_binary.erl | 55.556% | 88.889% | -33.333% | 0 | 3 |
mongoose_lib.erl | 41.667% | 50.000% | -8.333% | 0 | 1 |
ELDAPv3.erl | 14.709% | 22.713% | -8.004% | 690 | 690 |
mod_mam_utils.erl | 82.979% | 88.339% | -5.360% | -1 | 15 |
eldap_filter_yecc.erl | 15.236% | 20.233% | -4.996% | 141 | 141 |
mod_mam_odbc_prefs.erl | 95.604% | 98.901% | -3.297% | 0 | 3 |
mod_bosh_socket.erl | 80.464% | 81.457% | -0.993% | 0 | 3 |
p1_fsm_old.erl | 35.849% | 36.604% | -0.755% | 0 | 2 |
mongoose_rdbms.erl | 68.493% | 69.178% | -0.685% | 0 | 1 |
ejabberd_config.erl | 63.347% | 63.771% | -0.424% | 0 | 2 |
ejabberd_app.erl | 83.333% | 83.750% | -0.417% | -2 | 0 |
mod_mam.erl | 89.577% | 89.902% | -0.326% | 0 | 1 |
mod_muc.erl | 68.144% | 68.421% | -0.277% | 0 | 1 |
================================================================================
Removed files | Coverage | Rel | Non |
---|---|---|---|
mongoose_deprecations.erl | 96.429% | 28 | 1 |
================================================================================