tensorflow / custom-op
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 36 units with 341 lines of code in units (6.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (130 lines of code)
    • 6 small units (87 lines of code)
    • 26 very small units (124 lines of code)
0% | 0% | 38% | 25% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 43% | 20% | 35%
cc0% | 0% | 0% | 57% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gpu0% | 0% | 44% | 21% | 33%
tensorflow_time_two/cc0% | 0% | 0% | 41% | 58%
tensorflow_zero_out/cc0% | 0% | 0% | 92% | 7%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _find_cuda_config()
in gpu/find_cuda_config.py
49 7 2
def find_cuda_config()
in gpu/find_cuda_config.py
33 13 0
def _find_tensorrt_config()
in gpu/find_cuda_config.py
25 4 2
def _find_cublas_config()
in gpu/find_cuda_config.py
23 4 3
def _find_cudnn_config()
in gpu/find_cuda_config.py
16 2 2
def _find_nccl_config()
in gpu/find_cuda_config.py
16 2 2
def _get_ld_config_paths()
in gpu/find_cuda_config.py
15 6 0
def _get_default_cuda_paths()
in gpu/find_cuda_config.py
14 4 1
void Compute()
in tensorflow_zero_out/cc/kernels/zero_out_kernels.cc
13 3 1
void Compute()
in tensorflow_time_two/cc/kernels/time_two_kernels.cc
13 1 1
def _find_library()
in gpu/find_cuda_config.py
10 3 3
def _find_versioned_file()
in gpu/find_cuda_config.py
10 4 5
def _header_paths()
in gpu/find_cuda_config.py
9 1 0
def _library_paths()
in gpu/find_cuda_config.py
9 1 0
def main()
in gpu/find_cuda_config.py
7 3 0
__global__ void TimeTwoCudaKernel()
in tensorflow_time_two/cc/kernels/time_two_kernels.cu.cc
6 2 3
void operator()
in tensorflow_time_two/cc/kernels/time_two_kernels.cu.cc
6 1 0
def _matches_version()
in gpu/find_cuda_config.py
6 2 2
def _get_header_version()
in gpu/find_cuda_config.py
6 3 2
def _not_found_error()
in gpu/find_cuda_config.py
6 3 3