aws-samples / aws-panorama-shelf-monitoring
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 23 units with 207 lines of code in units (28.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (97 lines of code)
    • 2 small units (27 lines of code)
    • 17 very small units (83 lines of code)
0% | 0% | 46% | 13% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 63% | 11% | 25%
js0% | 0% | 26% | 15% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cloudformation/custom_resources/sqsInvokedFunction0% | 0% | 92% | 0% | 7%
src/graphql0% | 0% | 31% | 0% | 68%
cloudformation/custom_resources/getAppSyncEndpoint0% | 0% | 47% | 28% | 23%
amplify/backend/function0% | 0% | 0% | 100% | 0%
cloudformation/custom_resources/githubhelper0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
query ListShelfMonitors()
in src/graphql/queries.js
25 1 1
def __init__()
in cloudformation/custom_resources/sqsInvokedFunction/gqllayer.py
25 1 2
def handler()
in cloudformation/custom_resources/sqsInvokedFunction/lambda_function.py
25 4 2
def get_appsync_endpoint()
in cloudformation/custom_resources/getAppSyncEndpoint/custom_resource.py
22 5 1
async function sendAlert()
in amplify/backend/function/smartshelf72d32494/src/index.js
14 2 2
def poll_create()
in cloudformation/custom_resources/getAppSyncEndpoint/custom_resource.py
13 3 2
def create()
in cloudformation/custom_resources/githubhelper/custom_resource.py
10 1 2
deleteShelfMonitor()
in src/graphql/mutations.js
8 1 2
createShelfMonitor()
in src/graphql/mutations.js
8 1 2
updateShelfMonitor()
in src/graphql/mutations.js
8 1 2
getShelfMonitor()
in src/graphql/queries.js
8 1 1
def create()
in cloudformation/custom_resources/getAppSyncEndpoint/custom_resource.py
7 1 2
__type()
in src/graphql/introspections.js
5 1 1
mutation DeleteShelfMonitor()
in src/graphql/mutations.js
5 1 1
mutation CreateShelfMonitor()
in src/graphql/mutations.js
5 1 1
mutation UpdateShelfMonitor()
in src/graphql/mutations.js
5 1 1
query GetShelfMonitor()
in src/graphql/queries.js
2 1 1
def no_op()
in cloudformation/custom_resources/githubhelper/custom_resource.py
2 1 2
def handler()
in cloudformation/custom_resources/githubhelper/custom_resource.py
2 1 2
def client()
in cloudformation/custom_resources/sqsInvokedFunction/gqllayer.py
2 1 1