|
Boost : |
From: Eddy Pronk (epronk_at_[hidden])
Date: 2007-06-25 07:45:47
GNOCCHI - A COMPLEXITY ANALYSER FOR C++
Gnocchi calculates cyclomatic and the NPATH complexity measures.
USES
boost.graph
boost.program_options
boost.filesystem
DESCRIPTION
It reads the coverage information produced by GCC and determines the
complexity of all functions. If code is compiled with -fprofile-arcs
or -ftest-coverage (depending on compiler version) GCC creates a .gcno
file for every object file.
It now considers C++ exceptions as part of the output.
mccabe=5(+4) means the complexity is 5 + 4 = 9 if exceptions are considered.
example:
gcc -fprofile-arcs -ftest-coverage -c test_input.c
./gnocchi --threshold 4 test_input.gcno
outputs:
test_input.c:118: mccabe=5 npath=5
test_input.c:89: mccabe=5(+4) npath=16(+15)
test_input.c:67: mccabe=9 npath=80
you can the latest release here:
http://gnocchi.sf.net
http://sourceforge.net/projects/gnocchi
Eddy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk