awslabs / ml-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 643 units with 7,463 lines of code in units (45.9% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (325 lines of code)
    • 16 medium complex units (994 lines of code)
    • 32 simple units (1,477 lines of code)
    • 592 very simple units (4,667 lines of code)
0% | 4% | 13% | 19% | 62%
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
cc0% | 6% | 15% | 23% | 54%
h0% | 0% | 8% | 10% | 81%
py0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/mlio/record_readers0% | 36% | 14% | 4% | 44%
src/mlio-py/mlio0% | 3% | 13% | 20% | 62%
src/mlio0% | 4% | 23% | 28% | 43%
src/mlio/data_stores0% | 0% | 12% | 17% | 69%
src/mlio/streams0% | 0% | 0% | 14% | 85%
src/mlio/instance_readers0% | 0% | 0% | 19% | 80%
src/mlio/memory0% | 0% | 0% | 28% | 71%
src/mlio/util0% | 0% | 0% | 34% | 65%
include/mlio0% | 0% | 0% | 0% | 100%
include/mlio/memory0% | 0% | 0% | 0% | 100%
src/mlio/detail0% | 0% | 0% | 0% | 100%
include/mlio/streams0% | 0% | 0% | 0% | 100%
include/mlio/util0% | 0% | 0% | 0% | 100%
src/mlio/integ0% | 0% | 0% | 0% | 100%
include/mlio/detail0% | 0% | 0% | 0% | 100%
include/mlio/data_stores0% | 0% | 0% | 0% | 100%
src/mlio-py0% | 0% | 0% | 0% | 100%
include/mlio/record_readers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
std::optional get_data_type()
in src/mlio-py/mlio/core/py_buffer.cc
99 38 1
std::optional Csv_record_reader::read_line()
in src/mlio/record_readers/csv_record_reader.cc
128 30 2
bool Csv_reader::Decoder::decode()
in src/mlio/csv_reader.cc
98 26 2
void Column_analyzer::analyze()
in src/mlio-py/mlio/contrib/insights/column_analyzer.cc
89 22 1
bool Recordio_protobuf_reader::Decoder::decode_feature()
in src/mlio/recordio_protobuf_reader.cc
73 19 1
bool Recordio_protobuf_reader::Decoder::decode_feature()
in src/mlio/recordio_protobuf_reader.cc
49 16 2
bool Csv_record_tokenizer::next()
in src/mlio/csv_record_tokenizer.cc
76 16 0
void register_exceptions()
in src/mlio-py/mlio/core/error.cc
74 15 1
bool Image_reader::decode_core()
in src/mlio/image_reader.cc
66 15 2
XXH_FORCE_INLINE void XXH3_accumulate_512()
in src/mlio-py/mlio/contrib/insights/hll/xxh3.h
167 14 4
void throw_nested_error()
in src/mlio-py/mlio/core/error.cc
45 14 2
py::buffer_info to_py_buffer()
in src/mlio-py/mlio/core/py_device_array.cc
68 14 1
Memory_slice Default_chunk_reader::read_chunk()
in src/mlio/record_readers/detail/default_chunk_reader.cc
49 13 1
Compression infer_compression()
in src/mlio/data_stores/detail/util.cc
19 13 1
cv::Mat Image_reader::decode_image()
in src/mlio/image_reader.cc
46 13 3
bool Image_reader::crop()
in src/mlio/image_reader.cc
45 12 3
Intrusive_ptr Recordio_protobuf_reader::decode()
in src/mlio/recordio_protobuf_reader.cc
47 11 1
bool Recordio_protobuf_reader::Decoder::decode()
in src/mlio/recordio_protobuf_reader.cc
41 11 2
40 11 1
void register_data_readers()
in src/mlio-py/mlio/core/data_reader.cc
400 10 1