aws-samples / pcluster-manager
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 174 units with 3,547 lines of code in units (53.8% of code).
    • 3 very long units (355 lines of code)
    • 12 long units (763 lines of code)
    • 46 medium size units (1,400 lines of code)
    • 44 small units (649 lines of code)
    • 69 very small units (380 lines of code)
10% | 21% | 39% | 18% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js11% | 23% | 39% | 17% | 7%
py0% | 10% | 41% | 21% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
frontend/src/pages16% | 29% | 38% | 10% | 6%
frontend/src/components0% | 38% | 43% | 11% | 6%
ROOT0% | 93% | 0% | 0% | 6%
frontend/src0% | 0% | 39% | 47% | 12%
api0% | 0% | 47% | 24% | 27%
awslambda0% | 0% | 44% | 24% | 31%
infrastructure/cognitolambda0% | 0% | 77% | 0% | 22%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function FsxLustreSettings()
in frontend/src/pages/Configure/Storage.js
127 15 1
export default function WizardDialog()
in frontend/src/pages/Configure/WizardDialog.js
118 25 1
function StorageInstance()
in frontend/src/pages/Configure/Storage.js
110 19 1
function ComputeResource()
in frontend/src/pages/Configure/Queues.js
91 10 3
function InstanceSelect()
in frontend/src/pages/Configure/Components.js
86 6 4
function EbsSettings()
in frontend/src/pages/Configure/Storage.js
75 8 1
function regions()
in frontend/src/components/TopBar.js
63 2 1
export default function ClusterActions()
in frontend/src/pages/Clusters/ClusterActions.js
63 7 0
function HeadNode()
in frontend/src/pages/Configure/HeadNode.js
59 7 0
def run()
in app.py
57 2 0
function RegionSelect()
in frontend/src/pages/Configure/Cluster.js
56 4 0
function CustomAMISettings()
in frontend/src/pages/Configure/Cluster.js
55 11 0
function VpcSelect()
in frontend/src/pages/Configure/Cluster.js
55 14 0
export default function ImageBuildDialog()
in frontend/src/pages/CustomImages/ImageBuildDialog.js
52 9 1
function Storage()
in frontend/src/pages/Configure/Storage.js
51 9 0
function DcvSettings()
in frontend/src/pages/Configure/HeadNode.js
50 9 0
function Queue()
in frontend/src/pages/Configure/Queues.js
49 6 1
def get_dcv_session()
in api/PclusterApiHandler.py
46 8 0
function loadTemplateLazy()
in frontend/src/pages/Configure/util.js
46 19 2
function EfsSettings()
in frontend/src/pages/Configure/Storage.js
46 6 1