aws-samples / appsync-refarch-realtime
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 21 units with 300 lines of code in units (16.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (72 lines of code)
    • 4 medium size units (113 lines of code)
    • 0 small units (0 lines of code)
    • 16 very small units (115 lines of code)
0% | 24% | 37% | 0% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 24% | 37% | 0% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 37% | 58% | 0% | 3%
src/graphql0% | 0% | 0% | 0% | 100%
sam-app/get-movie0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
72 16 0
constructor()
in src/App.js
35 1 1
function registerValidSW()
in src/serviceWorker.js
33 8 2
function checkValidServiceWorker()
in src/serviceWorker.js
23 4 2
export function register()
in src/serviceWorker.js
22 5 1
listMoviess()
in src/graphql/queries.js
10 1 3
listReviewss()
in src/graphql/queries.js
10 1 3
export function unregister()
in src/serviceWorker.js
7 2 0
createMovies()
in src/graphql/mutations.js
7 1 1
updateMovies()
in src/graphql/mutations.js
7 1 1
deleteMovies()
in src/graphql/mutations.js
7 1 1
createReviews()
in src/graphql/mutations.js
7 1 1
updateReviews()
in src/graphql/mutations.js
7 1 1
deleteReviews()
in src/graphql/mutations.js
7 1 1
getMovies()
in src/graphql/queries.js
7 1 1
getReviews()
in src/graphql/queries.js
7 1 1
getMovies()
in sam-app/get-movie/app.js
7 1 1
createMovies()
in sam-app/get-movie/app.js
7 1 1
updateMovies()
in sam-app/get-movie/app.js
7 1 1
updateReviews()
in sam-app/get-movie/app.js
7 1 1