microsoft / sqlmlutils
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 172 units with 2,995 lines of code in units (88.3% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (609 lines of code)
    • 7 medium complex units (486 lines of code)
    • 17 simple units (590 lines of code)
    • 145 very simple units (1,310 lines of code)
0% | 20% | 16% | 19% | 43%
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
R0% | 26% | 15% | 23% | 33%
py0% | 0% | 17% | 6% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
R/R0% | 26% | 15% | 23% | 33%
Python/sqlmlutils0% | 0% | 29% | 11% | 59%
Python/sqlmlutils/packagemanagement0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
245 37 9
206 28 6
158 26 7
121 18 5
def __init__()
in Python/sqlmlutils/sqlbuilder.py
43 16 6
def execute_query()
in Python/sqlmlutils/sqlqueryexecutor.py
41 16 4
def script_parameter_text()
in Python/sqlmlutils/sqlbuilder.py
43 14 5
execute <- function()
in R/R/executeInSQL.R
77 14 3
82 12 6
79 12 8
parseScope <- function()
in R/R/sqlPackage.R
30 10 1
25 10 1
49 10 4
42 8 8
handleTailParams <- function()
in R/R/storedProcedureScripting.R
59 8 2
def to_sql_type()
in Python/sqlmlutils/sqlbuilder.py
11 7 1
def create_sproc_from_script()
in Python/sqlmlutils/sqlpythonexecutor.py
21 7 5
45 7 5
executeSproc <- function()
in R/R/storedProcedure.R
37 7 4
createQuery <- function()
in R/R/storedProcedure.R
34 7 3