dart-lang / dart-services
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 294 units with 3,422 lines of code in units (45.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (217 lines of code)
    • 12 simple units (454 lines of code)
    • 278 very simple units (2,751 lines of code)
0% | 0% | 6% | 13% | 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% | 6% | 13% | 80%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tool0% | 0% | 18% | 20% | 60%
lib/src/protos0% | 0% | 15% | 0% | 84%
lib/src0% | 0% | 0% | 17% | 82%
example/web0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
benchmark0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Future testPath()
in tool/fuzz_driver.dart
70 13 3
factory VersionResponse()
in lib/src/protos/dart_services.pb.dart
49 12 12
factory AnalysisIssue()
in lib/src/protos/dart_services.pb.dart
45 11 11
Future main()
in tool/fuzz_driver.dart
53 11 1
Future compileDDC()
in lib/src/compiler.dart
68 9 1
72 9 3
Future compile()
in lib/src/compiler.dart
63 8 3
Future _compileDart2js()
in lib/src/common_server_impl.dart
53 8 3
Future _processRequest()
in lib/src/common_server_api.dart
44 6 2
Future copyPath()
in lib/src/compiler.dart
16 6 2
List getUnsupportedImports()
in lib/src/project.dart
20 6 2
String normalizeFilePaths()
in lib/src/utils.dart
18 6 1
Future complete()
in lib/src/analysis_server.dart
40 6 2
Future testDocument()
in tool/fuzz_driver.dart
20 6 2
Future testCompletions()
in tool/fuzz_driver.dart
20 6 2
Future testFixes()
in tool/fuzz_driver.dart
20 6 2
Map _readVersionMap()
in lib/src/sdk.dart
22 5 1
factory DiagnosticMessage()
in lib/src/protos/dart_services.pb.dart
21 5 5
factory CompleteResponse()
in lib/src/protos/dart_services.pb.dart
21 5 5
factory ProblemAndFixes()
in lib/src/protos/dart_services.pb.dart
21 5 5