microsoft / appcenter-sdk-android-breakpad
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 2,253 units with 42,309 lines of code in units (40.1% of code).
    • 35 very long units (12,741 lines of code)
    • 95 long units (6,460 lines of code)
    • 361 medium size units (11,668 lines of code)
    • 385 small units (5,712 lines of code)
    • 1,377 very small units (5,728 lines of code)
30% | 15% | 27% | 13% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc33% | 16% | 27% | 12% | 10%
mm9% | 16% | 34% | 28% | 11%
h4% | 0% | 13% | 22% | 59%
c0% | 36% | 55% | 6% | 2%
m0% | 35% | 24% | 22% | 17%
go0% | 0% | 48% | 34% | 17%
py0% | 0% | 54% | 9% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/processor57% | 11% | 16% | 6% | 7%
src/common/dwarf17% | 20% | 23% | 12% | 25%
src/client/linux9% | 18% | 37% | 21% | 13%
src/client/mac11% | 28% | 34% | 15% | 10%
src/common/windows18% | 22% | 42% | 8% | 8%
src/common/linux15% | 6% | 38% | 20% | 18%
src/client/windows11% | 10% | 42% | 20% | 13%
src/common0% | 18% | 35% | 16% | 29%
src/common/mac0% | 24% | 21% | 29% | 25%
src/tools/mac0% | 25% | 43% | 17% | 13%
src/client/ios0% | 11% | 31% | 43% | 12%
src/tools/windows0% | 21% | 50% | 15% | 12%
src/client/solaris0% | 7% | 63% | 19% | 8%
src/common/solaris0% | 10% | 62% | 17% | 9%
src/tools/linux0% | 35% | 16% | 17% | 30%
src/client0% | 14% | 42% | 13% | 30%
src/tools/python0% | 0% | 54% | 9% | 35%
src/google_breakpad/processor0% | 0% | 0% | 22% | 77%
src/common/android0% | 0% | 0% | 54% | 46%
src/tools/solaris0% | 0% | 0% | 100% | 0%
src/google_breakpad/common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
string NTStatusToString()
in src/processor/symbolic_constants_win.cc
6357 2116 1
string MinidumpProcessor::GetCrashReason()
in src/processor/minidump_processor.cc
925 255 2
bool MinidumpContext::Read()
in src/processor/minidump.cc
552 89 1
static void PrintStack()
in src/processor/stackwalk_common.cc
342 107 6
void DumpContext::Print()
in src/processor/dump_context.cc
322 27 0
static bool RunTests()
in src/processor/postfix_evaluator_unittest.cc
230 22 0
void GetCallerFrame::IPAddressIsNotInKnownModuleTestImpl()
in src/processor/stackwalker_x86_unittest.cc
230 3 1
bool CallFrameInfo::State::DoInstruction()
in src/common/dwarf/dwarf2reader.cc
201 84 0
bool LoadSymbols()
in src/common/linux/dump_symbols.cc
193 26 7
int __breakpad_fdnlist()
in src/client/mac/handler/breakpad_nlist_64.cc
186 49 4
static bool RunTests()
in src/processor/contained_range_map_unittest.cc
178 6 0
174 61 0
ProcessResult MinidumpProcessor::Process()
in src/processor/minidump_processor.cc
171 39 2
bool Breakpad::ExtractParameters()
in src/client/mac/Framework/Breakpad.mm
168 38 1
bool WriteCPUInformation()
in src/client/linux/minidump_writer/minidump_writer.cc
155 27 1
bool LineInfo::ProcessOneOpcode()
in src/common/dwarf/dwarf2reader.cc
149 29 8
void MinidumpMiscInfo::Print()
in src/processor/minidump.cc
144 13 0
void MinidumpModule::Print()
in src/processor/minidump.cc
136 10 0
uint32_t DisassemblerX86::NextInstruction()
in src/processor/disassembler_x86.cc
134 77 0
bool CallFrameInfo::ReadCIEFields()
in src/common/dwarf/dwarf2reader.cc
132 30 1