dart-lang / dump-info-visualizer
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 74 units with 871 lines of code in units (54.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (108 lines of code)
    • 5 simple units (199 lines of code)
    • 67 very simple units (564 lines of code)
0% | 0% | 12% | 22% | 64%
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% | 12% | 22% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 14% | 17% | 67%
web0% | 0% | 0% | 56% | 43%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void _addMetadata()
in lib/src/hierarchy_view.dart
81 19 5
void sort()
in lib/src/tree_table.dart
27 13 1
List diff()
in lib/src/diff_alg.dart
33 10 2
void _renderRow()
in lib/src/hierarchy_view.dart
58 9 2
void _display()
in lib/src/hierarchy_view.dart
26 6 0
factory HistoryState()
in lib/src/history_state.dart
18 6 2
void init()
in web/viewer.dart
64 6 0
int _computeSize()
in lib/src/hierarchy_view.dart
13 5 3
Set _triviallyReachedFrom()
in lib/src/info_helper.dart
16 5 1
static HistoryState fromJson()
in lib/src/history_state.dart
14 5 1
void _diff()
in lib/src/diff_view.dart
10 4 0
void _setupProgramwideInfo()
in lib/src/program_info_view.dart
25 4 0
void show()
in lib/src/logical_row.dart
18 4 1
void _update()
in lib/src/diff_view.dart
9 3 2
TableCellElement _verticalCell()
in lib/src/hierarchy_view.dart
10 3 4
SpanElement _span()
in lib/src/hierarchy_view.dart
10 3 2
TableCellElement _cell()
in lib/src/hierarchy_view.dart
16 3 4
int _toInt()
in lib/src/hierarchy_view.dart
9 3 1
void clear()
in lib/src/tree_table.dart
16 3 0
void reset()
in lib/src/tree_table.dart
11 3 0