aws-samples / amazon-location-safety-tracker
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 30 units with 304 lines of code in units (56.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (55 lines of code)
    • 12 small units (173 lines of code)
    • 16 very small units (76 lines of code)
0% | 0% | 18% | 56% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift0% | 0% | 19% | 60% | 19%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
muster-point-client0% | 0% | 37% | 27% | 34%
auth0% | 0% | 0% | 100% | 0%
muster-point-patrol0% | 0% | 0% | 88% | 11%
supporting-files/function0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func locationManagerDidChangeAuthorization()
in muster-point-client/LocationManager.swift
28 6 1
func listGeofences()
in muster-point-client/GeofenceHandler.swift
27 5 0
func manageUser()
in auth/AuthService.swift
19 4 0
func signOut()
in auth/AuthService.swift
18 5 0
func saveUser()
in auth/AuthService.swift
18 3 1
func observeAuthEvents()
in auth/AuthService.swift
16 3 0
func onTrackingEvent()
in muster-point-client/LocationManager.swift
15 6 1
func locationManager()
in muster-point-client/LocationManager.swift
14 4 2
func checkSessionStatus()
in auth/AuthService.swift
13 3 0
func configureAmplify()
in muster-point-patrol/muster_point_patrolApp.swift
13 2 0
func configureAmplify()
in muster-point-client/muster_point_clientApp.swift
12 2 0
func queryUsers()
in muster-point-patrol/ContentView.swift
12 3 0
func observeUsers()
in muster-point-patrol/ContentView.swift
12 3 0
func signInWithWebUI()
in auth/AuthService.swift
11 3 0
updateUser()
in supporting-files/function/index.js
10 1 1
func makeUIView()
in muster-point-client/MapView.swift
9 1 1
query getUser()
in supporting-files/function/index.js
8 1 1
func updateUIView()
in muster-point-client/MapView.swift
6 2 2
func mapView()
in muster-point-client/MapView.swift
5 1 2
init()
in muster-point-client/muster_point_clientApp.swift
5 1 0