microsoft / Azure-Kinect-Samples
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 413 units with 7,550 lines of code in units (23.8% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (276 lines of code)
    • 11 medium complex units (778 lines of code)
    • 32 simple units (1,407 lines of code)
    • 368 very simple units (5,089 lines of code)
0% | 3% | 10% | 18% | 67%
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
cpp0% | 5% | 17% | 25% | 51%
c0% | 4% | 3% | 12% | 78%
cs0% | 0% | 1% | 13% | 85%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
opencv-kinfu-samples0% | 48% | 24% | 13% | 13%
body-tracking-samples/sample_helper_libs0% | 1% | 4% | 12% | 81%
pipe-to-python-samples0% | 0% | 73% | 26% | 0%
body-tracking-samples/camera_space_transform_sample0% | 0% | 75% | 0% | 24%
body-tracking-samples/offline_processor0% | 0% | 55% | 0% | 44%
body-tracking-samples/floor_detector_sample0% | 0% | 22% | 37% | 40%
body-tracking-samples/simple_3d_viewer0% | 0% | 19% | 56% | 24%
body-tracking-samples/sample_unity_bodytracking0% | 0% | 2% | 11% | 85%
body-tracking-samples/jump_analysis_sample0% | 0% | 0% | 33% | 66%
body-tracking-samples/simple_sample0% | 0% | 0% | 77% | 22%
body-tracking-samples/csharp_3d_viewer0% | 0% | 0% | 17% | 82%
body-tracking-samples/simple_cpp_sample0% | 0% | 0% | 71% | 28%
build2019/csharp0% | 0% | 0% | 14% | 85%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static void find_coreGL()
in body-tracking-samples/sample_helper_libs/window_controller_3d/glad/glad.c
46 39 1
int main()
in opencv-kinfu-samples/main.cpp
230 28 2
private static HumanBodyBones MapKinectJoint()
in body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/PuppetAvatar.cs
28 22 1
static int has_ext()
in body-tracking-samples/sample_helper_libs/window_controller_3d/glad/glad.c
37 14 1
DWORD WINAPI InstanceThread()
in pipe-to-python-samples/main.cpp
78 14 1
int main()
in body-tracking-samples/camera_space_transform_sample/main.cpp
137 13 0
std::optional Samples::FloorDetector::TryDetectFloorPlane()
in body-tracking-samples/floor_detector_sample/FloorDetector.cpp
65 13 4
void WindowController3d::Create()
in body-tracking-samples/sample_helper_libs/window_controller_3d/WindowController3d.cpp
95 13 5
static void create_undistortion_lut()
in opencv-kinfu-samples/main.cpp
66 13 5
static void remap()
in opencv-kinfu-samples/main.cpp
51 13 4
bool process_mkv_offline()
in body-tracking-samples/offline_processor/main.cpp
83 12 2
void VisualizeResult()
in body-tracking-samples/simple_3d_viewer/main.cpp
58 12 4
int _tmain()
in pipe-to-python-samples/main.cpp
80 12 1
protected override void RunBackgroundThreadAsync()
in body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs
84 10 2
void PlayFile()
in body-tracking-samples/simple_3d_viewer/main.cpp
72 10 1
int main()
in body-tracking-samples/simple_sample/main.c
88 10 0
int main()
in body-tracking-samples/jump_analysis_sample/main.cpp
84 9 0
void Window3dWrapper::AddBody()
in body-tracking-samples/sample_helper_libs/window_controller_3d/Window3dWrapper.cpp
31 9 2
void WindowController3d::RenderScene()
in body-tracking-samples/sample_helper_libs/window_controller_3d/WindowController3d.cpp
45 9 2
void WindowController3d::KeyPressCallback()
in body-tracking-samples/sample_helper_libs/window_controller_3d/WindowController3d.cpp
34 9 5