aws-solutions / real-time-live-sports-updates-using-aws-appsync
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 118 units with 4,511 lines of code in units (9.0% of code).
    • 16 very long units (2,606 lines of code)
    • 9 long units (568 lines of code)
    • 31 medium size units (972 lines of code)
    • 6 small units (87 lines of code)
    • 56 very small units (278 lines of code)
57% | 12% | 21% | 1% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js57% | 12% | 21% | 1% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
webapp/src66% | 16% | 12% | <1% | 4%
functions/preprocess-function62% | 0% | 28% | 3% | 5%
functions/gameupdates-notifications-function0% | 0% | 79% | 20% | 0%
functions/gamesimulator-init-function0% | 0% | 57% | 15% | 27%
functions/scheduler-function0% | 0% | 90% | 0% | 9%
functions/gamesimulator-scheduler-function0% | 0% | 75% | 0% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
createGame()
in source/webapp/src/graphql/mutations.js
208 1 2
updateGame()
in source/webapp/src/graphql/mutations.js
208 1 2
deleteGame()
in source/webapp/src/graphql/mutations.js
208 1 2
getGame()
in source/webapp/src/graphql/queries.js
208 1 1
createGameEvent()
in source/webapp/src/graphql/mutations.js
190 1 2
updateGameEvent()
in source/webapp/src/graphql/mutations.js
190 1 2
deleteGameEvent()
in source/webapp/src/graphql/mutations.js
190 1 2
getGameEvent()
in source/webapp/src/graphql/queries.js
190 1 1
listGameEvents()
in source/webapp/src/graphql/queries.js
139 1 3
createGameEvent()
in source/functions/preprocess-function/index.js
134 1 2
listGames()
in source/webapp/src/graphql/queries.js
127 1 3
createStage()
in source/webapp/src/graphql/mutations.js
126 1 2
updateStage()
in source/webapp/src/graphql/mutations.js
126 1 2
deleteStage()
in source/webapp/src/graphql/mutations.js
126 1 2
getStage()
in source/webapp/src/graphql/queries.js
126 1 1
updateGame()
in source/functions/preprocess-function/index.js
110 1 2
createSeason()
in source/webapp/src/graphql/mutations.js
71 1 2
updateSeason()
in source/webapp/src/graphql/mutations.js
71 1 2
deleteSeason()
in source/webapp/src/graphql/mutations.js
71 1 2
getSeason()
in source/webapp/src/graphql/queries.js
71 1 1