tensorflow / recommenders-addons
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 712 units with 10,281 lines of code in units (15.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (425 lines of code)
    • 25 medium complex units (1,789 lines of code)
    • 58 simple units (1,894 lines of code)
    • 626 very simple units (6,173 lines of code)
0% | 4% | 17% | 18% | 60%
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% | 12% | 15% | 17% | 54%
hpp0% | 0% | 39% | 20% | 39%
cc0% | 0% | 11% | 11% | 76%
hh0% | 0% | 3% | 27% | 68%
h0% | 0% | 0% | 24% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_recommenders_addons/embedding_variable/python0% | 26% | 34% | 13% | 25%
tensorflow_recommenders_addons/dynamic_embedding/python0% | 11% | 8% | 17% | 63%
tensorflow_recommenders_addons/dynamic_embedding/core0% | 0% | 19% | 20% | 59%
build_deps/toolchains/gpu0% | 0% | 13% | 21% | 65%
ROOT0% | 0% | 0% | 18% | 81%
tensorflow_recommenders_addons/utils0% | 0% | 0% | 27% | 72%
tools0% | 0% | 0% | 42% | 57%
tensorflow_recommenders_addons/embedding_variable/core0% | 0% | 0% | 0% | 100%
tensorflow_recommenders_addons0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def DynamicEmbeddingOptimizer()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/dynamic_embedding_optimizer.py
174 41 2
def _get_single_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
115 33 17
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_partitioned_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
128 23 17
def find_cuda_config()
in build_deps/toolchains/gpu/find_cuda_config.py
56 21 0
Status ParseJsonConfig()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_table_op_util.hpp
172 20 2
def get_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
65 20 14
def get_variable()
in tensorflow_recommenders_addons/embedding_variable/python/ops/embedding_variable.py
128 19 16
def _sparse_reshape_gpu()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/math_ops.py
43 17 3
def _create_slot_var()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/tf_patch.py
51 16 8
Status ReCreateTableBuckets()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_table_op.cc
102 15 2
static unsigned char hex_value()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/json.cc
25 14 1
static int new_value()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/json.cc
58 14 5
virtual Status MsetCommand()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
73 13 7
std::vector BuildKeysPrefixNameSlices()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_table_op_util.hpp
65 13 4
def _get_processor()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/tf_patch.py
19 13 1
def device_function()
in tensorflow_recommenders_addons/dynamic_embedding/python/ops/tf_patch.py
16 13 2
virtual Status Conn()
in tensorflow_recommenders_addons/dynamic_embedding/core/kernels/redis_impl/redis_cluster_connection_pool.hpp
42 12 0