tensorflow / fold
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 963 units with 7,336 lines of code in units (65.5% of code).
    • 1 very long units (114 lines of code)
    • 7 long units (460 lines of code)
    • 58 medium size units (1,711 lines of code)
    • 140 small units (1,973 lines of code)
    • 757 very small units (3,078 lines of code)
1% | 6% | 23% | 26% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 3% | 25% | 25% | 42%
cc0% | 15% | 31% | 30% | 22%
h0% | 0% | 3% | 24% | 71%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tensorflow_fold/blocks4% | 2% | 22% | 24% | 46%
tensorflow_fold/loom0% | 26% | 36% | 25% | 11%
tensorflow_fold/llgtm/backend0% | 8% | 28% | 28% | 35%
tensorflow_fold/llgtm0% | 0% | 10% | 31% | 58%
tensorflow_fold/loom/calculator_example0% | 0% | 38% | 26% | 34%
tensorflow_fold/loom/benchmarks0% | 0% | 24% | 33% | 42%
tensorflow_fold/util0% | 0% | 0% | 0% | 100%
tensorflow_fold/llgtm/platform0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _register_options()
in tensorflow_fold/blocks/plan.py
114 8 2
void TfGraphEvaluator::Init()
in tensorflow_fold/llgtm/backend/tf_evaluator.cc
99 1 0
bool VerifyLoomMetadata()
in tensorflow_fold/loom/weaver.cc
73 15 2
def _setup_network()
in tensorflow_fold/loom/loom.py
63 18 1
bool Weaver::MergeFromSerialized()
in tensorflow_fold/loom/weaver.cc
61 12 1
def _run()
in tensorflow_fold/blocks/plan.py
57 8 3
tensor_idx_t Weaver::MakeConstantSerialized()
in tensorflow_fold/loom/weaver.cc
54 6 2
void Weaver::Finalize()
in tensorflow_fold/loom/weaver.cc
53 12 0
std::vector Weaver::CallOp()
in tensorflow_fold/loom/weaver.cc
48 11 2
def _validate()
in tensorflow_fold/blocks/blocks.py
47 30 2
def __init__()
in tensorflow_fold/loom/loom.py
45 6 13
def _construct_loom_layer()
in tensorflow_fold/loom/loom.py
44 7 3
void WeaverOpBase::Compute()
in tensorflow_fold/loom/weaver_op_base.cc
43 7 1
bool Weaver::Deserialize()
in tensorflow_fold/loom/weaver.cc
42 7 1
string Weaver::Serialize()
in tensorflow_fold/loom/weaver.cc
39 7 0
def _update_input_type()
in tensorflow_fold/blocks/blocks.py
38 11 1
TensorBase FullyConnectedLayer::Invoke()
in tensorflow_fold/llgtm/layers.cc
38 10 3
def _eval()
in tensorflow_fold/blocks/block_compiler.py
37 23 6
absl::string_view opcode_name()
in tensorflow_fold/llgtm/tensor_opcodes.cc
37 2 1
def build_feed_dict()
in tensorflow_fold/loom/loom.py
37 12 2