Right now coverage reports look like this:
...
602 861 int P2PSocketHostStunTcp::ProcessInput(char* input, int input_len) {
603 861 if (input_len < kPacketHeaderSize + kPacketLengthOffset)
604 6 return 0;
605 855
606 855 int pad_bytes;
607 855 int packet_size = GetExpectedPacketSize(
608 855 input, input_len, &pad_bytes);
609 855
610 855 if (input_len < packet_size + pad_bytes)
611 852 return 0;
612 3
613 3 // We have a complete packet. Read through it.
614 3 int consumed = 0;
...
Where the second column is number of hits. It might be cool if higher numbers would have some bright green highlight, and lower numbers would be more yellow-sh, an so on. So the column itself would be a bar showing "coverage density".
Shouldn't be hard to implement inside llvm-cov. We just have to find a good formula to make that look good, i.e. in the example above lines #604 and #612, #613, #614 should look almost the same, as they have relatively low coverage compared to other lines.
Comment 1 by mmoroz@chromium.org
, Jan 3Labels: -Pri-2 Pri-3