apple / HomeKitADK
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 339 files with 57,324 lines of code.
    • 10 very long files (15,820 lines of code)
    • 21 long files (13,807 lines of code)
    • 39 medium size files (12,957 lines of codeclsfd_ftr_w_mp_ins)
    • 51 small files (7,369 lines of code)
    • 218 very small files (7,371 lines of code)
27% | 24% | 22% | 12% | 12%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
c33% | 24% | 24% | 13% | 5%
h8% | 20% | 16% | 10% | 42%
m0% | 51% | 24% | 11% | 12%
S0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
HAP45% | 26% | 13% | 7% | 8%
PAL/Crypto31% | 34% | 8% | 18% | 6%
PAL/Linux0% | 17% | 39% | 24% | 18%
PAL/POSIX0% | 17% | 39% | 24% | 18%
PAL/Raspi0% | 17% | 39% | 24% | 18%
External/JSON0% | 94% | 0% | 0% | 5%
PAL/Darwin0% | 42% | 19% | 9% | 28%
Applications/Lock0% | 49% | 41% | 0% | 9%
PAL0% | 15% | 30% | 25% | 28%
PAL/Mock0% | 0% | 31% | 29% | 38%
Applications/Lightbulb0% | 0% | 73% | 17% | 8%
External/HTTP0% | 0% | 91% | 0% | 8%
Tools/AccessorySetupGenerator0% | 0% | 100% | 0% | 0%
Applications0% | 0% | 100% | 0% | 0%
External/Base640% | 0% | 0% | 86% | 13%
Longest Files (Top 50)
File# lines# units
HAPIPAccessoryServer.c
in HAP
3765 69
HAPIPAccessoryProtocol.c
in HAP
2024 14
HAPIPAccessory.c
in HAP
1615 3
HAPCharacteristic.c
in HAP
1480 53
HAPAccessoryServer.c
in HAP
1381 35
HAPBLEPeripheralManager.c
in HAP
1318 16
HAPPairingPairSetup.c
in HAP
1114 10
HAPTLVReader.c
in HAP
1067 19
HAPBLEProcedure.c
in HAP
1030 10
base_folding8.h
in PAL/Crypto/MbedTLS/Ed25519
1026 -
HAP.h
in HAP
995 -
HAPBLEAccessoryServer+Advertising.c
in HAP
900 9
HAPPairingPairVerify.c
in HAP
871 10
HAPPairingPairings.c
in HAP
854 11
HAPLog+Attributes.h
in HAP
828 -
HAPAccessoryValidation.c
in HAP
702 3
HAPPlatformTCPStreamManager.c
in PAL/Linux
647 18
HAPPlatformTCPStreamManager.c
in PAL/POSIX
647 18
HAPPlatformTCPStreamManager.c
in PAL/Raspi
647 18
HAPBLEPDU+TLV.c
in HAP
640 13
HAPSession.c
in HAP
640 18
util_json_reader.c
in External/JSON
629 4
HAPMbedTLS.c
in PAL/Crypto/MbedTLS
604 40
HAPTLVWriter.c
in HAP
573 11
HAPPlatformBLEPeripheralManager.m
in PAL/Darwin
544 16
DB.c
in Applications/Lock
527 -
HAPBLEPDU.c
in HAP
526 12
HAPOpenSSL.c
in PAL/Crypto/OpenSSL
518 37
HAPJSONUtils.c
in HAP
507 18
HAPBLECharacteristicParseAndWriteValue.c
in HAP
506 2
HAPBase.h
in PAL
502 1
HAPPlatformRunLoop.c
in PAL/Linux
489 14
HAPPlatformRunLoop.c
in PAL/POSIX
489 14
HAPPlatformRunLoop.c
in PAL/Raspi
489 14
util_http_reader.c
in External/HTTP
482 11
HAPCharacteristicTypes.h
in HAP
469 -
HAPTLV.c
in HAP
458 5
HAPCharacteristic.h
in HAP
438 -
HAPTLV+Internal.h
in HAP
438 -
DB.c
in Applications/Lightbulb
419 -
HAPMFiHWAuth.c
in HAP
417 8
HAPAccessorySetupInfo.c
in HAP
387 16
HAPBase+Float.c
in PAL
374 14
HAPPlatformFileManager.c
in PAL/Linux
370 5
HAPPlatformFileManager.c
in PAL/POSIX
370 5
HAPPlatformFileManager.c
in PAL/Raspi
370 5
HAPPlatformBLEPeripheralManager.c
in PAL/Mock
368 16
HAPLog.h
in PAL
365 -
HAPBLECharacteristic+Broadcast.c
in HAP
324 6
HAPPlatformKeyValueStore.c
in PAL/Linux
310 9
Files With Most Units (Top 20)
File# lines# units
HAPIPAccessoryServer.c
in HAP
3765 69
HAPCharacteristic.c
in HAP
1480 53
HAPMbedTLS.c
in PAL/Crypto/MbedTLS
604 40
HAPOpenSSL.c
in PAL/Crypto/OpenSSL
518 37
HAPAccessoryServer.c
in HAP
1381 35
HAPTLVReader.c
in HAP
1067 19
HAPJSONUtils.c
in HAP
507 18
HAPSession.c
in HAP
640 18
HAPPlatformTCPStreamManager.c
in PAL/Linux
647 18
HAPPlatformTCPStreamManager.c
in PAL/Mock
309 18
HAPPlatformTCPStreamManager.c
in PAL/POSIX
647 18
HAPPlatformTCPStreamManager.c
in PAL/Raspi
647 18
curve25519_mehdi.c
in PAL/Crypto/MbedTLS/Ed25519
293 17
HAPAccessorySetupInfo.c
in HAP
387 16
HAPBLEPeripheralManager.c
in HAP
1318 16
HAPPlatformBLEPeripheralManager.m
in PAL/Darwin
544 16
HAPPlatformBLEPeripheralManager.c
in PAL/Mock
368 16
App.c
in Applications/Lock
222 14
HAPIPAccessoryProtocol.c
in HAP
2024 14
HAPPlatformTCPStreamManager.m
in PAL/Darwin
253 14
Files With Long Lines (Top 1)

There is only one file with lines longer than 120 characters. In total, there are 2 long lines.

File# lines# units# long lines
HAPIPAccessoryServer.c
in HAP
3765 69 2