tensorflow / ngraph-bridge
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 342 units with 6,694 lines of code in units (70.2% of code).
    • 8 very long units (1,486 lines of code)
    • 19 long units (1,202 lines of code)
    • 63 medium size units (2,031 lines of code)
    • 75 small units (1,095 lines of code)
    • 177 very small units (880 lines of code)
22% | 17% | 30% | 16% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc23% | 18% | 30% | 16% | 11%
py20% | 19% | 31% | 13% | 15%
h0% | 0% | 0% | 46% | 53%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ngraph_bridge22% | 18% | 29% | 17% | 12%
ROOT68% | 14% | 17% | 0% | 0%
ngraph_bridge/kernels59% | 34% | 0% | 6% | 0%
tools0% | 29% | 42% | 13% | 15%
diagnostics/model_test0% | 43% | 42% | 0% | 14%
ngraph_bridge/pass0% | 0% | 60% | 20% | 19%
diagnostics0% | 0% | 32% | 36% | 30%
diagnostics/model_accuracy0% | 0% | 45% | 33% | 20%
python/ngraph_bridge0% | 0% | 0% | 45% | 54%
python0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Status AssignClusters()
in ngraph_bridge/assign_clusters.cc
349 65 1
def main()
in build_ngtf.py
286 14 0
Status Encapsulator::AnalysisPass()
in ngraph_bridge/encapsulate_clusters.cc
209 38 0
static Status TranslateFusedConv2DOp()
in ngraph_bridge/ngraph_builder.cc
164 26 3
void NGraphEncapsulateOp::Compute()
in ngraph_bridge/kernels/ngraph_encapsulate_op.cc
132 11 1
Status Encapsulator::RewritePass()
in ngraph_bridge/encapsulate_clusters.cc
126 21 2
Status MarkForClustering()
in ngraph_bridge/mark_for_clustering.cc
110 18 2
Status Builder::TranslateGraph()
in ngraph_bridge/ngraph_builder.cc
110 19 5
static Status ValuesFromConstNode()
in ngraph_bridge/ngraph_builder.cc
91 23 3
def parse_logs()
in tools/log_parser.py
77 38 2
Status NGraphEncapsulateOp::GetExecutable()
in ngraph_bridge/kernels/ngraph_encapsulate_op.cc
76 10 2
static Status TranslateConv2DBackpropInputOp()
in ngraph_bridge/ngraph_builder.cc
76 5 3
static void MaybeLogPlacement()
in ngraph_bridge/deassign_clusters.cc
74 13 1
def build_tensorflow()
in tools/build_utils.py
71 9 8
bool Executable::Call()
in ngraph_bridge/executable.cc
69 15 2
static Status TranslateSplitVOp()
in ngraph_bridge/ngraph_builder.cc
62 13 3
def calculate_output()
in diagnostics/model_test/verify_model.py
60 19 3
static Status TranslateDepthwiseConv2dNativeOp()
in ngraph_bridge/ngraph_builder.cc
59 3 3
def main()
in build_tf.py
59 3 0
Status TensorToStream()
in ngraph_bridge/tf_utils.cc
56 18 2