firebase / snippets-cpp
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 64 units with 946 lines of code in units (85.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (91 lines of code)
    • 3 simple units (92 lines of code)
    • 59 very simple units (763 lines of code)
0% | 0% | 9% | 9% | 80%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cc0% | 0% | 38% | 10% | 51%
cpp0% | 0% | 0% | 9% | 90%
kt0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
blogs/sept-20210% | 0% | 37% | 10% | 52%
firestore/android/FirestoreSnippetsCpp/app/src/main/cpp0% | 0% | 0% | 9% | 90%
firestore/android/FirestoreSnippetsCpp/app/src/main/java/com/firebase/firestoresnippetscpp0% | 0% | 0% | 0% | 100%
firestore/ios/firestore-snippets-cpp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
66 20 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 ReadDataViewChangesBetweenSnapshots()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
30 6 1
void LoadFirestoreBundles()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
37 6 1
void ReadDataEventsForLocalChanges()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
22 4 1
void QuickstartAddData()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
32 3 1
void QuickstartReadData()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
18 3 1
void ReadDataGetDocument()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
20 3 1
void ReadDataSourceOptions()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
21 3 1
void ReadDataGetMultipleDocumentsFromCollection()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
22 3 1
void ReadDataGetAllDocumentsInCollection()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
18 3 1
void ReadDataListen()
in firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp
18 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
bool TryGetBoolean()
in blogs/sept-2021/converter.cc
7 3 2
int64_t TryGetInteger()
in blogs/sept-2021/converter.cc
7 3 2
double TryGetDouble()
in blogs/sept-2021/converter.cc
7 3 2
std::string TryGetString()
in blogs/sept-2021/converter.cc
8 3 2
bool TryGetBoolean()
in blogs/sept-2021/converter.cc
7 3 2