#lcov #coverage #diff

app lcov-diff-util

Command line tool to make delta of 2 lcov files

2 releases

0.2.1 Dec 8, 2022
0.2.0 Sep 10, 2021

#1020 in Command line utilities

Download history 1/week @ 2022-11-20 2/week @ 2022-11-27 26/week @ 2022-12-04 4/week @ 2022-12-11 5/week @ 2022-12-18 8/week @ 2022-12-25 3/week @ 2023-01-01 5/week @ 2023-01-08 4/week @ 2023-01-15 10/week @ 2023-01-22 5/week @ 2023-01-29 13/week @ 2023-02-05 24/week @ 2023-02-12 8/week @ 2023-02-19 76/week @ 2023-02-26 7/week @ 2023-03-05

115 downloads per month

MIT license

278 lines

Crates.io Docs.rs Travis CI Build Status LICENSE

Lcov Diff


  • Rust, install rustup, see
  • Cargo
  • genhtml(install lcov via apt)


git clone <repo>
cd lcov-diff
cargo build --release

See target/release If you would like to build debug version, just run: cargo build

To run tests:

cargo test --all

To install (to $HOME/.cargo/bin):

cargo install --path .

See cargo docs

Tool to diff lcov files

    lcov-diff [FLAGS] [OPTIONS] <FILE1> <FILE2>

    -h, --help       Prints help information
    -V, --version    Prints version information
    -v, --verbose    Show Debug logging

    -o, --output <PATH>    output file to write (stdout if not presented)
    -w, --web <web>        Generate html report from output file (default name web)

    <FILE1> <FILE2>    Files to process, right now just two of them

The output file contains the only lines/functions/basic blocks which are presented only in the first lcov file. To generate html report for the diff use genhtml tool, see.

lcov-diff first.info second.info -o out.info
genhtml --ignore-errors source -o web out.info

Or just run with -w/--web option to generate it automatically after getting diff file (if output is not set a tmp file will be used for it). The default output directory name is web. Also, it gets into panic if genhtml could not be invoked.

lcov-diff first.info second.info -w LCOV_HTML_DIR -o out.info


~188K SLoC