dart-lang / gcloud
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 186 units with 1,495 lines of code in units (45.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (108 lines of code)
    • 8 simple units (242 lines of code)
    • 175 very simple units (1,145 lines of code)
0% | 0% | 7% | 16% | 76%
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% | 7% | 16% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 18% | 9% | 71%
lib/src/db0% | 0% | 0% | 25% | 74%
lib0% | 0% | 0% | 9% | 90%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static Future runQuery()
in lib/src/datastore_impl.dart
60 19 5
26 12 1
bool _compareApiKey()
in lib/src/datastore_impl.dart
22 11 2
26 9 1
Future _commitHelper()
in lib/src/db/db.dart
47 9 4
Future commit()
in lib/src/datastore_impl.dart
52 9 5
void _tryLoadNewModelClass()
in lib/src/db/model_db_impl.dart
21 8 1
Map _propertiesFromModelDescription()
in lib/src/db/model_db_impl.dart
42 8 1
static bool hasDefaultConstructor()
in lib/src/db/model_db_impl.dart
12 6 1
void _checkSealed()
in lib/src/db/db.dart
12 6 2
Stream run()
in lib/src/db/db.dart
30 6 0
void _handlePage()
in lib/common.dart
11 5 1
Key fromDatastoreKey()
in lib/src/db/model_db_impl.dart
23 5 1
void _initialize()
in lib/src/db/model_db_impl.dart
21 5 1
bool _isExpandoClass()
in lib/src/db/model_db_impl.dart
11 5 1
Query query()
in lib/src/db/db.dart
14 5 2
bool validate()
in lib/src/db/annotations.dart
7 5 2
Object? encodeValue()
in lib/src/db/annotations.dart
10 5 3
static Future _handleError()
in lib/src/datastore_impl.dart
17 5 2
void register()
in lib/service_scope.dart
14 4 3