tensorflow / io
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 2,026 units with 28,879 lines of code in units (63.5% of code).
    • 1 very complex units (219 lines of code)
    • 10 complex units (1,386 lines of code)
    • 95 medium complex units (6,367 lines of code)
    • 153 simple units (6,057 lines of code)
    • 1,767 very simple units (14,850 lines of code)
<1% | 4% | 22% | 20% | 51%
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
h14% | 0% | 4% | 20% | 61%
cc0% | 5% | 25% | 22% | 46%
py0% | 2% | 12% | 14% | 70%
go0% | 0% | 59% | 19% | 21%
swift0% | 0% | 12% | 45% | 42%
R0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_io/core<1% | 5% | 25% | 21% | 47%
tools/build0% | 100% | 0% | 0% | 0%
tensorflow_io/python0% | 0% | 12% | 13% | 73%
tensorflow_io_gcs_filesystem/core0% | 0% | 7% | 47% | 44%
R-package/R0% | 0% | 0% | 0% | 100%
R-package/pkgdown0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Status ReadRecord()
in tensorflow_io/core/kernels/bigquery/bigquery_lib.h
219 52 5
Status Read()
in tensorflow_io/core/kernels/hdf5_kernels.cc
228 50 4
Status ParseNumpyHeader()
in tensorflow_io/core/kernels/numpy_kernels.cc
135 46 3
void Send()
in tensorflow_io/core/filesystems/http/http_filesystem.cc
143 42 1
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
static bool TestFeature()
in tensorflow_io/core/kernels/cpu_info.cc
45 38 1
Status Init()
in tensorflow_io/core/kernels/csv_kernels.cc
94 30 4
Status Read()
in tensorflow_io/core/kernels/parquet_kernels.cc
142 28 4
Status Read()
in tensorflow_io/core/kernels/csv_kernels.cc
103 27 6
def write_config()
in tools/build/configure.py
112 26 0
def __init__()
in tensorflow_io/python/experimental/numpy_dataset_ops.py
91 25 4
Status Init()
in tensorflow_io/core/kernels/arrow/arrow_kernels.cc
90 24 4
void Compute()
in tensorflow_io/core/kernels/kafka_kernels_deprecated.cc
123 24 1
Status Read()
in tensorflow_io/core/kernels/arrow/arrow_kernels.cc
95 23 6
Status Read()
in tensorflow_io/core/kernels/json_kernels.cc
94 23 6
virtual Status Init()
in tensorflow_io/core/kernels/kafka_kernels.cc
102 23 2
Status Read()
in tensorflow_io/core/kernels/avro_kernels.cc
97 23 6
Status SetupStreamsLocked()
in tensorflow_io/core/kernels/kafka_kernels_deprecated.cc
107 22 1
void Compute()
in tensorflow_io/core/kernels/arrow/arrow_kernels.cc
110 21 1