tensorflow / graphics
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 928 units with 18,032 lines of code in units (73.3% of code).
    • 15 very long units (1,914 lines of code)
    • 59 long units (3,928 lines of code)
    • 194 medium size units (6,164 lines of code)
    • 269 small units (3,936 lines of code)
    • 391 very small units (2,090 lines of code)
10% | 21% | 34% | 21% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 22% | 32% | 22% | 10%
cc0% | 9% | 66% | 8% | 15%
js0% | 15% | 33% | 27% | 24%
pyx0% | 0% | 57% | 42% | 0%
h0% | 0% | 30% | 21% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tensorflow_graphics/projects17% | 22% | 27% | 20% | 10%
tensorflow_graphics/geometry4% | 23% | 47% | 19% | 5%
tensorflow_graphics/rendering0% | 32% | 44% | 10% | 12%
tensorflow_graphics/math0% | 14% | 35% | 33% | 16%
tensorflow_graphics/datasets0% | 14% | 31% | 38% | 16%
tensorflow_graphics/nn0% | 13% | 51% | 19% | 15%
tensorflow_graphics/tensorboard0% | 15% | 33% | 27% | 24%
tensorflow_graphics/notebooks0% | 17% | 44% | 32% | 5%
tensorflow_graphics/util0% | 0% | 26% | 53% | 20%
tensorflow_graphics/image0% | 0% | 34% | 38% | 27%
tensorflow_graphics/io0% | 0% | 28% | 58% | 13%
tensorflow_graphics/g3doc0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def neural_voxel_renderer_plus()
in tensorflow_graphics/projects/neural_voxel_renderer/models.py
188 1 6
def neural_voxel_renderer_plus_tf2()
in tensorflow_graphics/projects/neural_voxel_renderer/models.py
185 1 3
def main()
in tensorflow_graphics/projects/nasa/track.py
167 16 1
def _val_epoch()
in tensorflow_graphics/projects/points_to_3Dobjects/train_multi_objects/train.py
157 33 9
def amass()
in tensorflow_graphics/projects/nasa/lib/datasets.py
125 12 2
def add_detections()
in tensorflow_graphics/projects/points_to_3Dobjects/utils/evaluator.py
122 15 3
def main()
in tensorflow_graphics/projects/neural_voxel_renderer/prepare_tfrecords/generate_tfrecords_nvr_plus.py
119 7 1
def update()
in tensorflow_graphics/projects/points_to_3Dobjects/utils/evaluator.py
110 21 7
def decode_bytes_multiple_scannet()
in tensorflow_graphics/projects/points_to_3Dobjects/data_preparation/extract_protos.py
110 12 1
def decode_bytes_multiple()
in tensorflow_graphics/projects/points_to_3Dobjects/data_preparation/extract_protos.py
108 12 1
def val()
in tensorflow_graphics/projects/points_to_3Dobjects/train_multi_objects/train.py
107 27 4
def more_things()
in tensorflow_graphics/projects/points_to_3Dobjects/models/centernet_vid.py
107 3 5
def energy()
in tensorflow_graphics/geometry/deformation_energy/as_conformal_as_possible.py
103 9 9
def get_transform_group()
in tensorflow_graphics/projects/points_to_3Dobjects/transforms/transforms_factory.py
103 8 2
def shapenet()
in tensorflow_graphics/projects/cvxnet/lib/datasets.py
103 10 2
def train()
in tensorflow_graphics/projects/points_to_3Dobjects/train_multi_objects/train.py
96 12 3
def main()
in tensorflow_graphics/projects/radiance_fields/nerf/eval.py
96 11 1
def create_discriminator()
in tensorflow_graphics/projects/gan/architectures_progressive_gan.py
94 16 2
def _init_graph()
in tensorflow_graphics/projects/local_implicit_grid/core/reconstruction.py
88 6 1
def estimate_radiance()
in tensorflow_graphics/rendering/light/point_light.py
88 6 11