firebase / abseil-cpp-SwiftPM
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 4,383 units with 32,724 lines of code in units (44.7% of code).
    • 5 very complex units (984 lines of code)
    • 13 complex units (1,169 lines of code)
    • 75 medium complex units (3,544 lines of code)
    • 208 simple units (5,204 lines of code)
    • 4,082 very simple units (21,823 lines of code)
3% | 3% | 10% | 15% | 66%
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
cc5% | 6% | 15% | 21% | 50%
h0% | <1% | 3% | 6% | 89%
inc0% | 0% | 16% | 33% | 49%
py0% | 0% | 0% | 21% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
absl/time16% | 1% | 16% | 19% | 46%
absl/synchronization8% | 4% | 6% | 21% | 58%
absl/strings1% | 6% | 14% | 18% | 58%
absl/debugging0% | 7% | 18% | 36% | 37%
absl/flags0% | 7% | 16% | 12% | 64%
absl/types0% | 4% | 0% | 1% | 94%
absl/random0% | 0% | 17% | 4% | 77%
absl/container0% | 0% | 2% | 11% | 85%
absl/status0% | 0% | 18% | 0% | 81%
absl/base0% | 0% | 1% | 16% | 81%
absl/hash0% | 0% | 0% | 11% | 88%
ROOT0% | 0% | 0% | 38% | 61%
absl0% | 0% | 0% | 19% | 80%
absl/algorithm0% | 0% | 0% | 0% | 100%
absl/numeric0% | 0% | 0% | 0% | 100%
absl/memory0% | 0% | 0% | 0% | 100%
absl/profiling0% | 0% | 0% | 0% | 100%
absl/functional0% | 0% | 0% | 0% | 100%
absl/copts0% | 0% | 0% | 0% | 100%
absl/cleanup0% | 0% | 0% | 0% | 100%
absl/utility0% | 0% | 0% | 0% | 100%
absl/meta0% | 0% | 0% | 0% | 100%
ci/CMake0% | 0% | 0% | 0% | 100%
CMake/install_test_project0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool parse()
in absl/time/internal/cctz/src/time_zone_format.cc
281 115 6
std::string format()
in absl/time/internal/cctz/src/time_zone_format.cc
202 82 4
bool CUnescapeInternal()
in absl/strings/escaping.cc
176 68 5
ABSL_ATTRIBUTE_NOINLINE void Mutex::UnlockSlow()
in absl/synchronization/mutex.cc
198 53 1
bool TimeZoneInfo::Load()
in absl/time/internal/cctz/src/time_zone_info.cc
127 52 1
static bool ParseExpression()
in absl/debugging/internal/demangle.cc
71 46 1
bool Base64UnescapeInternal()
in absl/strings/escaping.cc
151 44 6
static VisitIndicesResultT Run()
in absl/types/internal/variant.h
73 35 2
strings_internal::ParsedFloat ParseFloat()
in absl/strings/internal/charconv_parse.cc
106 33 3
static bool ParseSpecialName()
in absl/debugging/internal/demangle.cc
50 31 1
void ElfMemImage::Init()
in absl/debugging/internal/elf_mem_image.cc
104 30 1
120 30 2
bool FloatToSink()
in absl/strings/internal/str_format/float_conversion.cc
76 30 3
126 27 5
inline bool IDivFastPath()
in absl/time/duration.cc
62 26 4
static ExpDigits SplitToSix()
in absl/strings/numbers.cc
65 26 1
inline bool safe_parse_sign_and_base()
in absl/strings/numbers.cc
55 26 3
void Mutex::LockSlowLoop()
in absl/synchronization/mutex.cc
110 26 2
static bool ParseType()
in absl/debugging/internal/demangle.cc
45 24 1
71 23 6