Giter Site home page Giter Site logo

bright-tools / ccsm Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 49.0 762 KB

C Code Source Metrics - tool to gather simple metrics from C code

License: Apache License 2.0

CMake 0.41% C++ 71.88% Python 1.01% C 8.77% Shell 17.93%
clang complexity metrics source-metrics

ccsm's People

Contributors

bright-tools avatar milamikica avatar mringwal avatar ollehu avatar sei-emcneil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ccsm's Issues

Add Afferent Coupling metrics

Afferent Couplings (Ca): The number of other packages that depend upon classes within the package is an indicator of the package's responsibility.

Add "STMT" metric

HIS definition:

"Number of Instructions per function „STMT“"

Statement
An action that can be implemented on an individual basis.
(Source [ISO/IEC 9899:1999]; Kapitel 6.8: „A statement specifies an action to be performed.“)

Tidy up metric options

m_metricShortNames, m_metricNames, m_metricApplies, etc could be wrapped up into a struct or class, with an array of such classes representing the information currently located in each disparate array.

Add Efferent Coupling metrics

Efferent Couplings (Ce): The number of other packages that the classes in the package depend upon is an indicator of the package's independence.

def file idiom may not be not handled

In the def file idiom, the same file is included multiple times, generally with a different macro definition such that the pre-processor will token-replace the included file differently in each instance.

This brings up the question of how metrics associated with this file should be handled ...

  1. Should header files have their own metrics?
  2. If not expanding macros (see #46) then this doesn't matter.

Add comment density metrics

HIS definition:

"Relationship of the number of comments (outside of and within functions) to the number of statements".

Add a GUI

Simple GUI for people who don't want to use the command line

Add "CALLS" metric

HIS definition:

"How many different functions does this function call? Calling the same subfunction counts only once."

Files which are recursively included may not be handled correctly

Say we have something like this:

Header.h

extern int mex;
# if defined FOO

extern int foo;
# undef FOO
# include "header.h"
# else

extern int moo;
# endif

Where a file effectively includes itself, this may not be handled correctly by CCSM at the moment - CCSM is likely to process the file twice resulting in the metric count being artificially inflated.

Add "VOCF" metric

HIS definition:

"The language scope is an
indicator of the cost of
maintaining/changing functions.

VOCF = (N1 + N2) / (nl + n2),
where
nl = Number of different operators
N1 = Sum of all Operators
n2 = Number of different Operands
N2 = Sum of all Operands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.