apple / swift-atomics
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 16 units with 155 lines of code in units (1.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (23 lines of code)
    • 15 very simple units (132 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 0% | 17% | 82%
h0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Utilities0% | 0% | 0% | 17% | 82%
Sources/_AtomicsShims/include0% | 0% | 0% | 0% | 100%
Sources/_AtomicsShims/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 16 most complex units
Unit# linesMcCabe index# params
23 6 3
def token_pos_to_index()
in Utilities/gyb.py
19 5 3
def shimOrders()
in Utilities/gyb_utils.py
11 5 2
def tokenize_template()
in Utilities/gyb.py
64 4 1
def get_line_starts()
in Utilities/gyb.py
6 2 1
def strip_trailing_nl()
in Utilities/gyb.py
2 2 1
def split_lines()
in Utilities/gyb.py
2 2 1
def lowerFirst()
in Utilities/gyb_utils.py
2 2 1
def argLabel()
in Utilities/gyb_utils.py
2 2 1
_sa_dword _sa_dword_create()
in Sources/_AtomicsShims/include/_AtomicsShims.h
3 1 2
uintptr_t _sa_dword_extract_high()
in Sources/_AtomicsShims/include/_AtomicsShims.h
3 1 1
uintptr_t _sa_dword_extract_low()
in Sources/_AtomicsShims/include/_AtomicsShims.h
3 1 1
_sa_dword _sa_decode_dword()
in Sources/_AtomicsShims/include/_AtomicsShims.h
3 1 1
void _sa_retain_n()
in Sources/_AtomicsShims/src/_AtomicsShims.c
5 1 2
void _sa_release_n()
in Sources/_AtomicsShims/src/_AtomicsShims.c
5 1 2
def autogenerated_warning()
in Utilities/gyb_utils.py
2 1 0