aws-samples / amazon-sagemaker-multiple-object-tracking
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 261 units with 4,416 lines of code in units (85.4% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (501 lines of code)
    • 17 medium complex units (806 lines of code)
    • 32 simple units (743 lines of code)
    • 207 very simple units (2,366 lines of code)
0% | 11% | 18% | 16% | 53%
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% | 11% | 18% | 16% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
container-batch-inference/resources/FairMOT0% | 12% | 11% | 18% | 57%
container-serving/resources/FairMOT0% | 13% | 12% | 19% | 54%
container-dp/resources0% | 72% | 0% | 0% | 27%
container-dp/resources/FairMOT0% | 0% | 35% | 11% | 52%
ROOT0% | 0% | 0% | 69% | 30%
container-serving/resources0% | 0% | 0% | 18% | 81%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train()
in container-dp/resources/train.py
167 49 0
def __init__()
in container-serving/resources/FairMOT/config.py
64 33 3
def __init__()
in container-batch-inference/resources/FairMOT/config.py
64 33 3
def associate_tracker()
in container-serving/resources/FairMOT/multitracker.py
103 30 5
def associate_tracker()
in container-batch-inference/resources/FairMOT/multitracker.py
103 30 5
def main()
in container-dp/resources/FairMOT/train.py
97 22 1
def load_model()
in container-serving/resources/FairMOT/model.py
48 17 6
def load_model()
in container-dp/resources/FairMOT/model.py
48 17 6
def load_model()
in container-batch-inference/resources/FairMOT/model.py
48 17 6
def run_epoch()
in container-dp/resources/FairMOT/base_trainer.py
53 16 4
def parse()
in container-serving/resources/FairMOT/config.py
33 15 2
def get_data()
in container-dp/resources/FairMOT/jde.py
66 15 3
def parse()
in container-batch-inference/resources/FairMOT/config.py
33 15 2
def parse()
in container-serving/resources/FairMOT/opts.py
36 14 2
def parse()
in container-dp/resources/FairMOT/opts.py
36 14 2
def parse()
in container-batch-inference/resources/FairMOT/opts.py
36 14 2
def __getitem__()
in container-dp/resources/FairMOT/jde.py
66 13 2
def eval_seq()
in container-serving/resources/FairMOT/track.py
37 12 8
def eval_seq()
in container-dp/resources/FairMOT/track.py
37 12 8
def __init__()
in container-dp/resources/FairMOT/jde.py
49 12 6