microsoft / EdgeML
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 9,661 units with 96,810 lines of code in units (43.1% of code).
    • 14 very complex units (3,467 lines of code)
    • 47 complex units (7,679 lines of code)
    • 290 medium complex units (17,821 lines of code)
    • 419 simple units (13,944 lines of code)
    • 8,891 very simple units (53,899 lines of code)
3% | 7% | 18% | 14% | 55%
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
c17% | 41% | 18% | 9% | 12%
py4% | 9% | 14% | 14% | 55%
cpp4% | 5% | 21% | 19% | 49%
h<1% | 3% | 19% | 13% | 62%
hh0% | 0% | 9% | 2% | 87%
ino0% | 0% | 22% | 8% | 68%
js0% | 0% | 0% | 42% | 57%
cc0% | 0% | 0% | 39% | 60%
cs0% | 0% | 0% | 33% | 66%
cxx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cpp/eigen2% | 6% | 18% | 14% | 58%
tools/SeeDot8% | 8% | 18% | 16% | 47%
cpp/src7% | 4% | 25% | 17% | 45%
c_reference/src0% | 42% | 16% | 11% | 29%
pytorch/edgeml_pytorch0% | 14% | 7% | 15% | 62%
tf/edgeml_tf0% | 8% | 10% | 10% | 70%
applications/GesturePod0% | 6% | 20% | 8% | 64%
c_reference/models0% | 0% | 44% | 55% | 0%
cpp/drivers0% | 0% | 46% | 31% | 22%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def performSearch()
in tools/SeeDot/seedot/main.py
190 78 1
int main()
in tools/SeeDot/seedot/Predictor/main.cpp
345 77 2
def translateToC()
in tools/SeeDot/seedot/compiler/codegen/m3.py
462 75 3
int ctbmv_()
in cpp/eigen/blas/f2c/ctbmv.c
420 69 12
int ztbmv_()
in cpp/eigen/blas/f2c/ztbmv.c
420 69 12
void minimum_degree_ordering()
in cpp/eigen/Eigen/src/OrderingMethods/Amd.h
317 68 2
size_t Data::fillEntries()
in cpp/src/common/mmaped.cpp
149 64 7
inline void queryCacheSizes_intel_codes()
in cpp/eigen/Eigen/src/Core/util/Memory.h
78 62 3
size_t Data::libsvmFillEntries()
in cpp/src/common/mmaped.cpp
168 59 7
size_t Data::libsvmFillEntries()
in cpp/src/common/mmaped.cpp
163 58 7
def visitBop2()
in tools/SeeDot/seedot/compiler/ir/irBuilder.py
200 57 2
def visitLet()
in tools/SeeDot/seedot/compiler/ir/irBuilder.py
133 55 2
int dtbmv_()
in cpp/eigen/blas/f2c/dtbmv.c
211 53 12
int stbmv_()
in cpp/eigen/blas/f2c/stbmv.c
211 53 12
def train()
in tf/edgeml_tf/trainer/bonsaiTrainer.py
212 47 10
void MBConv()
in tools/SeeDot/seedot/Predictor/library_float.cpp
133 46 54
void sparselu_gemm()
in cpp/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h
206 45 9
int chbmv_()
in cpp/eigen/blas/f2c/chbmv.c
282 43 12
int zhbmv_()
in cpp/eigen/blas/f2c/zhbmv.c
283 43 12
EIGEN_DONT_INLINE void general_matrix_vector_product::run()
in cpp/eigen/Eigen/src/Core/products/GeneralMatrixVector.h
192 41 7