tensorflow / fold
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 963 units with 7,336 lines of code in units (65.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (47 lines of code)
    • 18 medium complex units (654 lines of code)
    • 59 simple units (1,281 lines of code)
    • 885 very simple units (5,354 lines of code)
0% | <1% | 8% | 17% | 72%
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% | 1% | 11% | 26% | 61%
cc0% | 0% | 10% | 11% | 78%
h0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_fold/blocks0% | 1% | 10% | 26% | 61%
tensorflow_fold/loom0% | 0% | 31% | 30% | 37%
tensorflow_fold/llgtm0% | 0% | 0% | 5% | 94%
tensorflow_fold/loom/calculator_example0% | 0% | 0% | 29% | 70%
tensorflow_fold/llgtm/backend0% | 0% | 0% | 1% | 98%
tensorflow_fold/loom/benchmarks0% | 0% | 0% | 4% | 95%
tensorflow_fold/util0% | 0% | 0% | 0% | 100%
tensorflow_fold/llgtm/platform0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _validate()
in tensorflow_fold/blocks/blocks.py
47 30 2
def _eval()
in tensorflow_fold/blocks/block_compiler.py
37 23 6
def _setup_network()
in tensorflow_fold/loom/loom.py
63 18 1
def finalize_stats()
in tensorflow_fold/blocks/plan.py
29 16 1
def _eval_batches()
in tensorflow_fold/blocks/plan.py
34 15 6
bool VerifyLoomMetadata()
in tensorflow_fold/loom/weaver.cc
73 15 2
def _setup_loom_ops()
in tensorflow_fold/loom/loom.py
12 14 2
def _run()
in tensorflow_fold/blocks/plan.py
27 13 3
def convert_to_type()
in tensorflow_fold/blocks/result_types.py
19 12 1
def _setup()
in tensorflow_fold/blocks/block_compiler.py
29 12 3
def _compile_blocks()
in tensorflow_fold/blocks/block_compiler.py
24 12 1
bool Weaver::MergeFromSerialized()
in tensorflow_fold/loom/weaver.cc
61 12 1
void Weaver::Finalize()
in tensorflow_fold/loom/weaver.cc
53 12 0
def build_feed_dict()
in tensorflow_fold/loom/loom.py
37 12 2
def init_loom()
in tensorflow_fold/blocks/plan.py
28 11 2
def _types_backward()
in tensorflow_fold/blocks/blocks.py
23 11 2
def _update_input_type()
in tensorflow_fold/blocks/blocks.py
38 11 1
std::vector Weaver::CallOp()
in tensorflow_fold/loom/weaver.cc
48 11 2
def __new__()
in tensorflow_fold/loom/loom.py
19 11 5
tensorflow::DataType GetTfDataType()
in tensorflow_fold/llgtm/backend/tf_evaluator.cc
13 10 1