firebase / snippets-cpp
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 64 units with 946 lines of code in units (85.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (66 lines of code)
    • 16 medium size units (439 lines of code)
    • 15 small units (219 lines of code)
    • 32 very small units (222 lines of code)
0% | 6% | 46% | 23% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc0% | 27% | 21% | 5% | 46%
cpp0% | 0% | 56% | 30% | 13%
kt0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
blogs/sept-20210% | 27% | 20% | 4% | 47%
firestore/android/FirestoreSnippetsCpp/app/src/main/cpp0% | 0% | 56% | 30% | 13%
firestore/android/FirestoreSnippetsCpp/app/src/main/java/com/firebase/firestoresnippetscpp0% | 0% | 0% | 0% | 100%
firestore/ios/firestore-snippets-cpp0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
66 20 1
void ReadDataExampleData()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
50 1 1
void LoadFirestoreBundles()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
37 6 1
void RunAllSnippets()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
33 1 1
void QuickstartAddData()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
32 3 1
void AddDataDataTypes()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
31 2 1
void ReadDataViewChangesBetweenSnapshots()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
30 6 1
void AddDataTransactions()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
27 2 1
FieldValue Converter::ConvertAny()
in blogs/sept-2021/converter.cc
25 12 2
FieldValue Converter::ConvertSpecialValue()
in blogs/sept-2021/converter.cc
25 7 1
void ReadDataGetMultipleDocumentsFromCollection()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
22 3 1
void ReadDataEventsForLocalChanges()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
22 4 1
void AddDataSetDocument()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 2 1
void AddDataBatchedWrites()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 2 1
void ReadDataSourceOptions()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 3 1
void ReadDataListenToMultipleDocumentsInCollection()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 3 1
void ReadDataExecuteQuery()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 3 1
void ReadDataGetDocument()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
20 3 1
void ReadDataPaginateQuery()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
20 2 1
void QuickstartReadData()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
18 3 1