flutter / devtools
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 3,607 units with 52,321 lines of code in units (68.1% of code).
    • 1 very complex units (116 lines of code)
    • 9 complex units (1,610 lines of code)
    • 82 medium complex units (5,417 lines of code)
    • 236 simple units (8,199 lines of code)
    • 3,279 very simple units (36,979 lines of code)
<1% | 3% | 10% | 15% | 70%
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
dart<1% | 3% | 10% | 15% | 70%
cpp0% | 0% | 0% | 71% | 28%
cc0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/devtools_app<1% | 2% | 10% | 15% | 70%
packages/devtools_server0% | 21% | 5% | 10% | 62%
packages/devtools_shared0% | 39% | 0% | 0% | 60%
tool/lib0% | 0% | 0% | 53% | 46%
tool0% | 0% | 0% | 44% | 55%
packages/devtools_test0% | 0% | 0% | 16% | 83%
case_study/memory_leak0% | 0% | 0% | 5% | 94%
case_study/code_size0% | 0% | 0% | 0% | 100%
case_study/memory_leaks0% | 0% | 0% | 0% | 100%
case_study/platform_channel0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static DateTime _parseCookieDate()
in packages/devtools_app/lib/src/http/_http_date.dart
116 65 1
List childrenRenderProperties()
in packages/devtools_app/lib/src/inspector/inspector_data_models.dart
171 44 5
Future serveDevTools()
in packages/devtools_server/lib/src/server.dart
279 38 18
Future buildVariablesTree()
in packages/devtools_app/lib/src/debugger/debugger_model.dart
141 36 3
FieldReference listToFieldEntries()
in packages/devtools_app/lib/src/memory/memory_snapshot_models.dart
150 32 6
static FutureOr handle()
in packages/devtools_shared/lib/src/server/server_api.dart
137 32 3
Widget build()
in packages/devtools_app/lib/src/inspector/diagnostics.dart
140 31 1
List buildTreemaps()
in packages/devtools_app/lib/src/charts/treemap.dart
163 31 6
String addServiceExtensions()
in packages/devtools_app/assets/scripts/inspector_polyfill_script.dart
229 27 0
void paint()
in packages/devtools_app/lib/src/charts/chart.dart
200 26 2
void _parseSetCookieValue()
in packages/devtools_app/lib/src/http/_http_cookies.dart
76 25 1
Widget _buildLayout()
in packages/devtools_app/lib/src/shared/split.dart
133 24 2
void didChangeDependencies()
in packages/devtools_app/lib/src/memory/memory_screen.dart
150 23 0
void performLayout()
in packages/devtools_app/lib/src/primitives/extent_delegate_list.dart
149 23 0
void drawSymbol()
in packages/devtools_app/lib/src/charts/chart.dart
84 23 6
void _handleDebugEvent()
in packages/devtools_app/lib/src/debugger/debugger_controller.dart
62 22 1
List computeColumnWidths()
in packages/devtools_app/lib/src/shared/table.dart
61 21 1
void computeInboundRefs()
in packages/devtools_app/lib/src/memory/memory_service.dart
84 21 3
Future toggleSelectedFrame()
in packages/devtools_app/lib/src/performance/performance_controller.dart
79 21 1
int compareTo()
in packages/devtools_app/lib/src/shared/version.dart
25 20 1