dart-lang / site-www
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 133 units with 1,394 lines of code in units (21.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (136 lines of code)
    • 4 simple units (136 lines of code)
    • 127 very simple units (1,122 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
dart0% | 0% | 15% | 4% | 79%
rb0% | 0% | 8% | 21% | 69%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/get-dart0% | 0% | 20% | 0% | 79%
src/_plugins0% | 0% | 8% | 21% | 69%
tool0% | 0% | 0% | 28% | 71%
src/assets0% | 0% | 0% | 0% | 100%
tool/dartpad_picker0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void updateTable()
in src/get-dart/dart_sdk_archive/lib/src/version_selector.dart
94 25 1
self.config
in src/_plugins/asset_bundler.rb
42 12 1
compress_command
in src/_plugins/asset_bundler.rb
46 10 1
load_content
in src/_plugins/asset_bundler.rb
35 9 1
List srcHtmlWithTips()
in tool/create_code_with_tooltips.dart
29 7 0
render
in src/_plugins/render.rb
26 7 1
String processTipInstruction()
in tool/create_code_with_tooltips.dart
28 5 3
void _initDartPad()
in tool/dartpad_picker/lib/dartpad_picker.dart
18 5 0
Future createDownloadLink()
in src/get-dart/sdk_builds.dart/lib/src/dart_downloads.dart
17 5 3
void _selectOsDropdown()
in src/get-dart/dart_sdk_archive/lib/src/version_selector.dart
11 5 0
void filterTable()
in src/get-dart/dart_sdk_archive/lib/src/version_selector.dart
22 5 0
String extractTooltipAnchors()
in tool/create_code_with_tooltips.dart
14 4 3
void main()
in tool/dartpad_picker/web/dartpad_picker_main.dart
21 4 0
List getEvenNumbers()
in tool/dartpad_picker/web/dartpad_picker_main.dart
11 4 1
Stream fetchVersionPaths()
in src/get-dart/sdk_builds.dart/lib/src/dart_downloads.dart
16 4 1
function setupOsTabs()
in src/assets/js/os-tabs.js
17 4 0
add_file_by_type
in src/_plugins/asset_bundler.rb
10 4 1
compress
in src/_plugins/asset_bundler.rb
11 4 1
static VersionInfo parse()
in src/get-dart/sdk_builds.dart/lib/src/version_info.dart
24 3 3
String? svnRevisionForVersion()
in src/get-dart/dart_sdk_archive/lib/src/util.dart
8 3 1