microsoft / Azure-Kinect-Sensor-SDK
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 1,318 units with 27,214 lines of code in units (59.5% of code).
    • 5 very complex units (1,760 lines of code)
    • 16 complex units (2,647 lines of code)
    • 62 medium complex units (5,277 lines of code)
    • 103 simple units (4,354 lines of code)
    • 1,132 very simple units (13,176 lines of code)
6% | 9% | 19% | 15% | 48%
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
cpp13% | 16% | 22% | 12% | 34%
c2% | 8% | 28% | 21% | 39%
h0% | 0% | 6% | 17% | 75%
py0% | 0% | 3% | 14% | 82%
cs0% | 0% | 0% | 14% | 85%
hpp0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/record19% | 14% | 25% | 13% | 26%
tools/k4aviewer8% | 2% | 8% | 18% | 62%
src/color16% | 22% | 37% | 3% | 20%
src/sdk24% | 0% | 14% | 8% | 52%
tools/k4arecorder0% | 77% | 0% | 10% | 12%
tools/updater0% | 29% | 24% | 11% | 35%
src/dewrapper0% | 44% | 0% | 17% | 37%
src/capturesync0% | 49% | 13% | 11% | 25%
src/image0% | 42% | 0% | 0% | 57%
tools/k4afastcapture_streaming0% | 25% | 47% | 0% | 27%
src/logging0% | 50% | 29% | 0% | 19%
src/usbcommand0% | 0% | 62% | 11% | 26%
src/transformation0% | 0% | 28% | 40% | 31%
src/calibration0% | 0% | 66% | 11% | 21%
src/tewrapper0% | 0% | 58% | 13% | 27%
src/imu0% | 0% | 47% | 18% | 33%
tools/k4afastcapture_trigger0% | 0% | 100% | 0% | 0%
src/firmware0% | 0% | 23% | 45% | 30%
src/depth0% | 0% | 25% | 44% | 29%
src/dynlib0% | 0% | 31% | 19% | 48%
src/queue0% | 0% | 31% | 0% | 68%
src/depth_mcu0% | 0% | 18% | 30% | 51%
cmake0% | 0% | 72% | 27% | 0%
include/k4ainternal0% | 0% | 19% | 41% | 39%
scripts0% | 0% | 0% | 53% | 46%
src/python0% | 0% | 0% | 11% | 88%
src/csharp0% | 0% | 0% | 5% | 94%
src/allocator0% | 0% | 0% | 26% | 73%
tools/deversion0% | 0% | 0% | 90% | 9%
src/color_mcu0% | 0% | 0% | 19% | 80%
src/deloader0% | 0% | 0% | 19% | 80%
include/k4arecord0% | 0% | 0% | 5% | 94%
include/k4a0% | 0% | 0% | 3% | 96%
src/math0% | 0% | 0% | 0% | 100%
src/rwlock0% | 0% | 0% | 0% | 100%
src/global0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
K4ADockControlStatus K4ADeviceDockControl::Show()
in tools/k4aviewer/k4adevicedockcontrol.cpp
462 86 0
k4a_result_t parse_recording_config()
in src/record/internal/matroska_read.cpp
334 62 1
416 55 2
240 55 2
k4a_result_t k4a_record_create()
in src/record/sdk/record.cpp
308 53 4
k4a_stream_result_t get_capture()
in src/record/internal/matroska_read.cpp
151 44 3
int main()
in tools/k4arecorder/main.cpp
318 43 2
int do_recording()
in tools/k4arecorder/recorder.cpp
182 38 7
void capturesync_add_capture()
in src/capturesync/capturesync.c
174 37 4
k4a_result_t UVCCameraReader::SetCameraControl()
in src/color/uvc_camerareader.cpp
206 37 3
static int depth_engine_thread()
in src/dewrapper/dewrapper.c
198 35 1
int main()
in tools/k4afastcapture_streaming/main.cpp
110 35 2
static void logger_init_once()
in src/logging/logging.cpp
94 32 1
void K4AWindowDock::Show()
in tools/k4aviewer/k4awindowdock.cpp
143 32 2
k4a_result_t image_create()
in src/image/image.c
172 31 6
static int parse_command_line()
in tools/updater/main.c
87 31 3
k4a_result_t convert_block_to_image()
in src/record/internal/matroska_read.cpp
180 30 4
k4a_result_t CMFCameraReader::Start()
in src/color/mfcamerareader.cpp
178 29 6
k4a_result_t UVCCameraReader::GetCameraControl()
in src/color/uvc_camerareader.cpp
175 29 3
k4a_result_t parse_mkv()
in src/record/internal/matroska_read.cpp
143 28 1