aws-samples / pcluster-manager
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 174 units with 3,547 lines of code in units (53.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (546 lines of code)
    • 32 simple units (1,161 lines of code)
    • 135 very simple units (1,840 lines of code)
0% | 0% | 15% | 32% | 51%
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% | 0% | 18% | 32% | 48%
py0% | 0% | 0% | 31% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frontend/src/pages0% | 0% | 24% | 34% | 41%
frontend/src0% | 0% | 0% | 32% | 67%
api0% | 0% | 0% | 35% | 64%
awslambda0% | 0% | 0% | 34% | 65%
frontend/src/components0% | 0% | 0% | 25% | 74%
ROOT0% | 0% | 0% | 0% | 100%
infrastructure/cognitolambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function WizardDialog()
in frontend/src/pages/Configure/WizardDialog.js
118 25 1
function loadTemplateLazy()
in frontend/src/pages/Configure/util.js
46 19 2
function StorageInstance()
in frontend/src/pages/Configure/Storage.js
110 19 1
function FsxLustreSettings()
in frontend/src/pages/Configure/Storage.js
127 15 1
function VpcSelect()
in frontend/src/pages/Configure/Cluster.js
55 14 0
function sourceValidate()
in frontend/src/pages/Configure/Source.js
35 12 1
function CustomAMISettings()
in frontend/src/pages/Configure/Cluster.js
55 11 0
function getIn()
in frontend/src/util.js
12 10 2
function rootReducer()
in frontend/src/store.js
40 10 2
export function SideBarIcons()
in frontend/src/components/SideBar.js
19 10 1
function SubnetSelect()
in frontend/src/pages/Configure/Components.js
30 10 3
function ComputeResource()
in frontend/src/pages/Configure/Queues.js
91 10 3
function CreateCluster()
in frontend/src/model.js
26 9 6
export default function SideBar()
in frontend/src/components/SideBar.js
23 9 1
export default function ImageBuildDialog()
in frontend/src/pages/CustomImages/ImageBuildDialog.js
52 9 1
function enableSsm()
in frontend/src/pages/Configure/HeadNode.js
20 9 1
function DcvSettings()
in frontend/src/pages/Configure/HeadNode.js
50 9 0
function Storage()
in frontend/src/pages/Configure/Storage.js
51 9 0
def get_dcv_session()
in api/PclusterApiHandler.py
46 8 0
def generate_response()
in awslambda/serverless_wsgi.py
19 8 2