android / health-samples
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 100 units with 1,223 lines of code in units (37.7% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (165 lines of code)
    • 14 medium size units (461 lines of code)
    • 14 small units (204 lines of code)
    • 69 very small units (393 lines of code)
0% | 13% | 37% | 16% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
kt0% | 13% | 37% | 16% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/ui0% | 56% | 11% | 0% | 32%
health-services/PassiveGoals/app/src/main/java/com/example/passivegoals0% | 40% | 0% | 23% | 36%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components0% | 0% | 58% | 19% | 22%
health-services/ExerciseSample/app/src/main/java/com/example/exercise0% | 0% | 31% | 19% | 48%
health-services/PassiveData/app/src/main/java/com/example/passivedata0% | 0% | 54% | 11% | 34%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/data0% | 0% | 60% | 19% | 19%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/navigation0% | 0% | 100% | 0% | 0%
health-services/MeasureData/app/src/main/java/com/example/measuredata0% | 0% | 50% | 23% | 25%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation0% | 0% | 82% | 0% | 17%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/theme0% | 0% | 0% | 100% | 0%
health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fun SessionDetailScreen()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/ui/SessionDetailScreen/SessionDetailScreen.kt
61 3 4
override fun onCreate()
in health-services/PassiveGoals/app/src/main/java/com/example/passivegoals/MainActivity.kt
53 4 1
fun ListSessionsScreen()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/ui/ListSessionsScreen/ListSessionsScreen.kt
51 3 2
fun HealthPlatformNavigation()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/navigation/HealthPlatformNavigation.kt
47 1 1
suspend fun startExercise()
in health-services/ExerciseSample/app/src/main/java/com/example/exercise/HealthServicesManager.kt
44 3 0
fun HealthPlatformBottomNavigation()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components/HealthPlatformBottomNavigation.kt
41 1 1
override fun onCreate()
in health-services/PassiveData/app/src/main/java/com/example/passivedata/MainActivity.kt
40 2 1
fun SessionDetailsMinMaxAvg()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components/SessionDetailsMinMaxAvg.kt
40 1 3
override fun onViewCreated()
in health-services/ExerciseSample/app/src/main/java/com/example/exercise/ExerciseFragment.kt
36 1 2
override fun onCreate()
in health-services/MeasureData/app/src/main/java/com/example/measuredata/MainActivity.kt
32 1 1
fun HealthPlatformApp()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/MainActivity.kt
32 2 1
fun HealthPlatformNotSupported()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components/HealthPlatformNotSupported.kt
28 1 1
override fun onStartCommand()
in health-services/ExerciseSample/app/src/main/java/com/example/exercise/ExerciseService.kt
27 3 3
suspend fun readSessionsList()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/data/HealthPlatformManager.kt
26 1 0
suspend fun readSessionDetails()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/data/HealthPlatformManager.kt
24 1 1
override fun onReceive()
in health-services/PassiveData/app/src/main/java/com/example/passivedata/PassiveDataReceiver.kt
22 2 2
fun TotalStepsScreen()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/ui/TotalStepsScreen/TotalStepsScreen.kt
22 3 3
fun SessionInfoColumn()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components/SessionInfoColumn.kt
18 1 5
fun TotalStepsEntry()
in health-platform-v1/HealthPlatformSample/app/src/main/java/com/example/healthplatformsample/presentation/components/TotalStepsEntry.kt
18 1 2
suspend fun prepareExercise()
in health-services/ExerciseSample/app/src/main/java/com/example/exercise/HealthServicesManager.kt
17 2 0