/dev/posts/

Number of lines of code with FlameGraph

Published:

Updated:

FlameGraph is used to display stack trace samples but we can ue it for other purposes as well.

For example, we can quite simply display where are the lines of code of a project:

cloc --csv-delimiter="$(printf '\t')" --by-file --quiet --csv src/ include/ |
sed '1,2d' |
cut -f 2,5 |
sed 's/\//;/g' |
./flamegraph.pl
FlameGraph of the number of lines of code
Number of lines of code in SimGrid

References