awslabs / one-line-scan
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 15 units with 211 lines of code in units (56.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (46 lines of code)
    • 3 simple units (68 lines of code)
    • 11 very simple units (97 lines of code)
0% | 0% | 21% | 32% | 45%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 33% | 33% | 33%
c0% | 0% | 0% | 29% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
utils0% | 0% | 33% | 33% | 33%
regression/analysis/afl-mini0% | 0% | 0% | 100% | 0%
regression/analysis/cprover-analysis0% | 0% | 0% | 0% | 100%
regression/analysis/one-line-cr-bot0% | 0% | 0% | 0% | 100%
regression/analysis/typical-bugs0% | 0% | 0% | 0% | 100%
regression/analysis/cppcheck0% | 0% | 0% | 0% | 100%
regression/compilation/git0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 15 most complex units
Unit# linesMcCabe index# params
def main()
in utils/extract_introduced_gcc_style.py
46 12 0
def comment_on_github_pr()
in utils/comment-github-pr.py
28 9 1
def markdownify_gcc_report()
in utils/comment-github-pr.py
19 7 3
int main()
in regression/analysis/afl-mini/read-stdin.c
21 6 2
int main()
in regression/analysis/cprover-analysis/main.c
14 4 2
int main()
in regression/analysis/typical-bugs/test.c
11 3 2
def drop_second_col()
in utils/extract_introduced_gcc_style.py
9 2 1
def main()
in utils/comment-github-pr.py
9 2 0
int main()
in regression/compilation/git/test.c
6 1 0
int f()
in regression/analysis/one-line-cr-bot/src/subsrc/sub.c
5 1 0
int main()
in regression/analysis/one-line-cr-bot/src/src.c
6 1 0
int f()
in regression/analysis/cppcheck/src/subsrc/sub.c
5 1 0
int main()
in regression/analysis/cppcheck/src/src.c
4 1 0
def usage()
in utils/extract_introduced_gcc_style.py
2 1 1
def parse_cli()
in utils/comment-github-pr.py
26 1 0