dart-lang / watcher
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 81 units with 888 lines of code in units (59.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (164 lines of code)
    • 9 simple units (221 lines of code)
    • 68 very simple units (503 lines of code)
0% | 0% | 18% | 24% | 56%
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% | 18% | 24% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/directory_watcher0% | 0% | 29% | 27% | 43%
lib/src0% | 0% | 0% | 22% | 77%
lib/src/file_watcher0% | 0% | 0% | 45% | 54%
benchmark0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
FileSystemEvent? _canonicalEvent()
in lib/src/directory_watcher/mac_os.dart
37 16 1
FileSystemEvent? _canonicalEvent()
in lib/src/directory_watcher/windows.dart
33 15 1
void _onBatch()
in lib/src/directory_watcher/mac_os.dart
51 13 1
void _onBatch()
in lib/src/directory_watcher/windows.dart
43 12 1
Set remove()
in lib/src/path_set.dart
28 9 1
void _applyChanges()
in lib/src/directory_watcher/linux.dart
22 9 3
List _eventsBasedOnFileSystem()
in lib/src/directory_watcher/mac_os.dart
27 9 1
List _eventsBasedOnFileSystem()
in lib/src/directory_watcher/windows.dart
33 9 1
Future _poll()
in lib/src/file_watcher/polling.dart
27 9 0
void _onBatch()
in lib/src/directory_watcher/linux.dart
33 8 1
Future _processFile()
in lib/src/directory_watcher/polling.dart
19 8 1
void _startParentWatcher()
in lib/src/directory_watcher/windows.dart
21 7 0
factory DirectoryWatcher()
in lib/src/directory_watcher.dart
11 6 2
Future _completePoll()
in lib/src/directory_watcher/polling.dart
11 5 0
void _poll()
in lib/src/directory_watcher/polling.dart
23 4 0
void _onDone()
in lib/src/directory_watcher/mac_os.dart
12 4 0
factory FileWatcher()
in lib/src/file_watcher.dart
9 4 2
void run()
in benchmark/path_set.dart
7 4 0
bool contains()
in lib/src/path_set.dart
10 3 1
bool containsDir()
in lib/src/path_set.dart
10 3 1