GithubHelp home page GithubHelp logo

code_analysis's Introduction

Code Analysis

Analyzing C source code with python to compile statistics. The aim is to push these statistics to Graphite/Grafana for visualization.

Using pycparser to parse the code. The code in utils/fake_libc_include is Copyright (c) 2008-2017, Eli Bendersky All rights reserved. Licensed under the 3-clause BSD license in that folder.

Grafana dashboard screenshot

Currently following stats are extracted:

max_nesting_depth The maximum number of nested scopes (if, for, while...) in the code
avg_max_nesting_depth The average deepest nesting level of functions
average_nesting_depth Average nesting level of a code line
funcs_with_statics The count of functions with static variables. To be represented as a ratio of all functions
function_count Number of defined functions within the source
average_function_length Average length of a function
average_function_params Average number of parameters per function
average_variable_count Average number of variables in a function. Excluding constants and loop variables
global_vars Number of non-constant static or extern global variables
extern_vars Number of non-constant extern variables
file_count Number of files prcessed
functions_without_params Number of functions without any parameters
functions_with_many_params Number of functions with over 4 parameters
long_functions Number of long functions
really_long_functions Number of really long functions

code_analysis's People

Contributors

elefantti avatar

Watchers

 avatar

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.