tensorflow / io
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 2,026 units with 28,879 lines of code in units (63.5% of code).
    • 21 very long units (2,880 lines of code)
    • 96 long units (6,688 lines of code)
    • 289 medium size units (9,237 lines of code)
    • 299 small units (4,417 lines of code)
    • 1,321 very small units (5,657 lines of code)
9% | 23% | 31% | 15% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cc11% | 27% | 31% | 14% | 14%
h14% | 8% | 30% | 13% | 32%
py2% | 7% | 37% | 19% | 32%
swift0% | 45% | 31% | 10% | 13%
go0% | 0% | 78% | 21% | 0%
R0% | 0% | 0% | 8% | 91%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tensorflow_io/core12% | 27% | 30% | 14% | 15%
tools/build100% | 0% | 0% | 0% | 0%
tensorflow_io/python0% | 7% | 38% | 20% | 33%
tensorflow_io_gcs_filesystem/core0% | 16% | 44% | 23% | 14%
R-package/R0% | 0% | 0% | 8% | 91%
R-package/pkgdown0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Status Read()
in tensorflow_io/core/kernels/hdf5_kernels.cc
228 50 4
Status ReadRecord()
in tensorflow_io/core/kernels/bigquery/bigquery_lib.h
219 52 5
void Compute()
in tensorflow_io/core/kernels/image_font_kernels.cc
205 41 1
Status Init()
in tensorflow_io/core/kernels/hdf5_kernels.cc
179 40 1
Status ParseAvro()
in tensorflow_io/core/kernels/avro/parse_avro_kernels.cc
162 11 6
void Send()
in tensorflow_io/core/filesystems/http/http_filesystem.cc
143 42 1
Status Read()
in tensorflow_io/core/kernels/parquet_kernels.cc
142 28 4
Status ParseNumpyHeader()
in tensorflow_io/core/kernels/numpy_kernels.cc
135 46 3
void Compute()
in tensorflow_io/core/kernels/image_jpeg2k_kernels.cc
127 18 1
void Compute()
in tensorflow_io/core/kernels/kafka_kernels_deprecated.cc
123 24 1
void Compute()
in tensorflow_io/core/kernels/image_pnm_kernels.cc
120 20 1
void Compute()
in tensorflow_io/core/kernels/audio_video_mp4_kernels.cc
118 9 1
void Compute()
in tensorflow_io/core/kernels/avro_kernels.cc
115 17 1
def write_config()
in tools/build/configure.py
112 26 0
Status MemcachedFileBlockCache::Read()
in tensorflow_io/core/kernels/gsmemcachedfs/memcached_file_block_cache.cc
112 20 5
static void MultiPartCopy()
in tensorflow_io/core/filesystems/s3/s3_filesystem.cc
111 14 7
void Compute()
in tensorflow_io/core/kernels/arrow/arrow_kernels.cc
110 21 1
Status SetupStreamsLocked()
in tensorflow_io/core/kernels/kafka_kernels_deprecated.cc
107 22 1
void Compute()
in tensorflow_io/core/kernels/audio_video_flac_kernels.cc
107 16 1
Status Read()
in tensorflow_io/core/kernels/csv_kernels.cc
103 27 6