tensorflow / recommenders-addons
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 712 units with 10,281 lines of code in units (15.7% of code).
    • 9 very long units (1,215 lines of code)
    • 28 long units (1,804 lines of code)
    • 108 medium size units (3,203 lines of code)
    • 153 small units (2,292 lines of code)
    • 414 very small units (1,767 lines of code)
11% | 17% | 31% | 22% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py20% | 8% | 31% | 20% | 18%
hpp18% | 30% | 32% | 14% | 4%
cc3% | 24% | 31% | 26% | 13%
h0% | 18% | 19% | 26% | 35%
hh0% | 0% | 33% | 30% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tensorflow_recommenders_addons/dynamic_embedding/core8% | 21% | 31% | 22% | 16%
tensorflow_recommenders_addons/embedding_variable/python53% | 6% | 24% | 6% | 7%
tensorflow_recommenders_addons/dynamic_embedding/python11% | 6% | 33% | 27% | 21%
tensorflow_recommenders_addons/embedding_variable/core0% | 30% | 22% | 29% | 18%
build_deps/toolchains/gpu0% | 27% | 31% | 22% | 18%
ROOT0% | 0% | 35% | 31% | 33%
tensorflow_recommenders_addons/utils0% | 0% | 50% | 27% | 22%
tools0% | 0% | 42% | 28% | 28%
tensorflow_recommenders_addons0% | 0% | 55% | 0% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def DynamicEmbeddingOptimizer()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/dynamic_embedding_optimizer.py
174 41 2
Status ParseJsonConfig()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_table_op_util.hpp
172 20 2
def _init_from_args()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable_ops.py
136 27 14
virtual Status RestoreFromDisk()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
130 23 4
virtual Status RestoreFromDisk()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_connection_pool.hpp
130 23 4
def get_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
128 19 16
def _get_partitioned_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
128 23 17
def _get_single_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
115 33 17
Status ReCreateTableBuckets()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_table_op.cc
102 15 2
void Compute()
in tensorflow_recommenders_addons/embedding_variable/core/kernels/ev_ops.cc
95 5 1
void SparseFillEmptyRowsGpuImpl()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/sparse_fill_empty_rows_op.cu.cc
93 3 6
virtual std::vector GetKeyBucketsAndOptimizerParamsWithName()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
89 11 2
virtual Status MsetCommand()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
73 13 7
static void MD5Transform()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/md5.cc
73 1 2
void ComputeAsync()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/segment_reduction_ops_impl.h
69 5 2
Status ValidateTableResourceHandle()
in tensorflow_recommenders_addons/dynamic_embedding/core/ops/cuckoo_hashtable_ops.cc
65 11 6
Status ValidateTableResourceHandle()
in tensorflow_recommenders_addons/dynamic_embedding/core/ops/redis_table_ops.cc
65 11 6
virtual Status DelCommand()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
65 12 5
std::vector BuildKeysPrefixNameSlices()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_table_op_util.hpp
65 13 4
def get_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
65 20 14