dart-lang / api.dart.dev
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 146 units with 1,210 lines of code in units (78.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (160 lines of code)
    • 6 simple units (131 lines of code)
    • 136 very simple units (919 lines of code)
0% | 0% | 13% | 10% | 75%
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
py0% | 0% | 13% | 10% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
server/scripts/cloudstorage0% | 0% | 10% | 13% | 75%
server/scripts0% | 0% | 23% | 0% | 76%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get()
in server/scripts/redirector.py
54 14 3
def _flush()
in server/scripts/cloudstorage/storage_api.py
39 14 2
def __iter__()
in server/scripts/cloudstorage/cloudstorage_api.py
39 12 1
def check_status()
in server/scripts/cloudstorage/errors.py
28 11 7
def run()
in server/scripts/cloudstorage/api_utils.py
41 10 3
def read()
in server/scripts/cloudstorage/storage_api.py
29 10 2
def _next_file_gen()
in server/scripts/cloudstorage/cloudstorage_api.py
16 7 2
def validate_options()
in server/scripts/cloudstorage/common.py
11 7 1
def _check()
in server/scripts/cloudstorage/api_utils.py
14 6 5
def readline()
in server/scripts/cloudstorage/storage_api.py
20 6 2
def get_latest_version()
in server/scripts/redirector.py
8 5 2
def build_gcs_path()
in server/scripts/redirector.py
11 5 4
def resolve_doc_path()
in server/scripts/redirector.py
24 5 2
def get_channel()
in server/scripts/redirector.py
10 5 1
def redir_name()
in server/scripts/redirector.py
15 5 3
def get_token_async()
in server/scripts/cloudstorage/rest_api.py
16 5 2
def open()
in server/scripts/cloudstorage/cloudstorage_api.py
23 5 7
def _should_get_another_batch()
in server/scripts/cloudstorage/cloudstorage_api.py
15 5 2
def _get_segments()
in server/scripts/cloudstorage/storage_api.py
12 5 3
def seek()
in server/scripts/cloudstorage/storage_api.py
16 5 3