aws / graph-notebook
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 349 units with 5,646 lines of code in units (66.8% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (800 lines of code)
    • 24 medium complex units (1,325 lines of code)
    • 33 simple units (860 lines of code)
    • 287 very simple units (2,661 lines of code)
0% | 14% | 23% | 15% | 47%
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% | 14% | 24% | 15% | 45%
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/graph_notebook/magics0% | 16% | 34% | 9% | 39%
src/graph_notebook/network0% | 24% | 19% | 24% | 31%
src/graph_notebook/notebooks0% | 19% | 18% | 17% | 44%
ROOT0% | 0% | 31% | 28% | 40%
src/graph_notebook/visualization0% | 0% | 33% | 30% | 35%
src/graph_notebook/neptune0% | 0% | 0% | 15% | 84%
src/graph_notebook/decorators0% | 0% | 0% | 45% | 54%
src/graph_notebook/options0% | 0% | 0% | 100% | 0%
src/graph_notebook/nbextensions0% | 0% | 0% | 0% | 100%
src/graph_notebook/widgets0% | 0% | 0% | 0% | 100%
src/graph_notebook/configuration0% | 0% | 0% | 0% | 100%
src/graph_notebook/seed0% | 0% | 0% | 0% | 100%
src/graph_notebook0% | 0% | 0% | 0% | 100%
src/graph_notebook/static_resources0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def add_results_with_pattern()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
69 47 3
def load()
in src/graph_notebook/magics/graph_magic.py
428 44 3
def add_results()
in src/graph_notebook/network/sparql/SPARQLNetwork.py
106 31 2
def setup_pretrained_endpoints()
in src/graph_notebook/notebooks/04-Machine-Learning/neptune_ml_utils.py
111 31 7
def add_path_edge()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
86 30 5
def sparql()
in src/graph_notebook/magics/graph_magic.py
142 24 4
def neptune_ml_endpoint()
in src/graph_notebook/magics/ml.py
73 24 4
def neptune_ml_training()
in src/graph_notebook/magics/ml.py
77 23 4
def neptune_ml_dataprocessing()
in src/graph_notebook/magics/ml.py
65 22 4
def add_results()
in src/graph_notebook/network/gremlin/GremlinNetwork.py
34 21 2
def parse_node()
in src/graph_notebook/network/opencypher/OCNetwork.py
48 20 3
def modeltransform_start()
in src/graph_notebook/magics/ml.py
63 19 3
def handle_opencypher_query()
in src/graph_notebook/magics/graph_magic.py
102 17 4
def get_node_property_value()
in src/graph_notebook/network/opencypher/OCNetwork.py
35 17 5
def gremlin()
in src/graph_notebook/magics/graph_magic.py
140 16 4
def parse_node()
in src/graph_notebook/network/sparql/SPARQLNetwork.py
38 16 4
def which()
in setupbase.py
25 16 3
def set_gremlin_profile_metrics()
in src/graph_notebook/magics/metadata.py
54 15 2
33 15 1
def db_reset()
in src/graph_notebook/magics/graph_magic.py
129 14 2