awslabs / datawig
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 489 units with 7,277 lines of code in units (62.8% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (204 lines of code)
    • 41 medium complex units (2,008 lines of code)
    • 55 simple units (1,663 lines of code)
    • 390 very simple units (3,402 lines of code)
0% | 2% | 27% | 22% | 46%
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
js0% | 2% | 25% | 24% | 46%
py0% | 2% | 32% | 18% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
datawig-js/static/jspsych-6.1.0/plugins0% | 4% | 26% | 25% | 43%
datawig0% | 3% | 34% | 17% | 44%
datawig-js/static/jspsych-6.1.00% | 0% | 23% | 24% | 52%
experiments0% | 0% | 14% | 19% | 66%
datawig-js/static/jspsych-6.1.0/plugins/template0% | 0% | 0% | 0% | 100%
datawig-js/blueprints0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
var after_response = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-iat-html.js
70 28 1
var after_response = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-iat-image.js
70 28 1
def __init__()
in datawig/imputer.py
64 27 5
def __fit_hp()
in datawig/_hpo.py
95 24 7
function updateDots()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-rdk.js
61 24 0
29 21 3
var _construct = function()
in datawig-js/static/jspsych-6.1.0/jspsych.js
58 21 0
def __preprocess_hps()
in datawig/_hpo.py
56 19 4
def fit_hpo()
in datawig/simple_imputer.py
65 19 25
plugin.trial = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-video-button-response.js
84 19 2
var listener_function = function()
in datawig-js/static/jspsych-6.1.0/jspsych.js
46 19 1
function evaluateFunctionParameters()
in datawig-js/static/jspsych-6.1.0/jspsych.js
37 18 1
module.autoPreload = function()
in datawig-js/static/jspsych-6.1.0/jspsych.js
50 18 6
function makeDotArray()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-rdk.js
73 17 0
def evaluate_and_persist_metrics()
in datawig/evaluation.py
81 16 8
plugin.trial = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-survey-text.js
72 16 2
plugin.trial = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-image-button-response.js
59 15 2
plugin.trial = function()
in datawig-js/static/jspsych-6.1.0/plugins/jspsych-video-keyboard-response.js
68 15 2
function checkExclusions()
in datawig-js/static/jspsych-6.1.0/jspsych.js
46 15 3
def fit()
in datawig/imputer.py
42 14 4